Skip to content

Commit

Permalink
connect: fixup some leftover debugging comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig committed Mar 23, 2020
1 parent dcac09c commit 9da0de2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions nomad/job_endpoint_hook_connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ func groupConnectHook(job *structs.Job, g *structs.TaskGroup) error {
task.Canonicalize(job, g)

makePort := func(label string) {
// check that port hasn't already been defined before adding it to tg
for _, p := range g.Networks[0].DynamicPorts {
if p.Label == label {
return
Expand Down
4 changes: 2 additions & 2 deletions nomad/job_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func TestJobEndpoint_Register_ConnectProxyExposeChecks(t *testing.T) {
ListenerPort: "v2Port",
}, grpcPath)

// todo: round tripping is probably gonna duplicate since we only append
// make sure round tripping does not create duplicate expose paths
out.Meta["test"] = "abc"
req.Job = out
r.NoError(msgpackrpc.CallWithCodec(codec, "Job.Register", req, &resp))
Expand All @@ -275,7 +275,7 @@ func TestJobEndpoint_Register_ConnectProxyExposeChecks(t *testing.T) {
out, err = state.JobByID(ws, job.Namespace, job.ID)
r.NoError(err)
r.NotNil(out)
r.Equal(resp.JobModifyIndex, out.CreateIndex) // todo uhh
r.Equal(resp.JobModifyIndex, out.CreateIndex)

// make sure we are not re-adding what has already been added
r.Len(out.TaskGroups[0].Services[0].Connect.SidecarService.Proxy.Expose.Paths, 2)
Expand Down
2 changes: 1 addition & 1 deletion nomad/structs/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type ServiceCheck struct {
Path string // path of the health check url for http type check
Protocol string // Protocol to use if check is http, defaults to http
PortLabel string // The port to use for tcp/http checks
AddressMode string // 'host' to use host ip:port or 'driver' to use driver'
AddressMode string // 'host' to use host ip:port or 'driver' to use driver's
Interval time.Duration // Interval of the check
Timeout time.Duration // Timeout of the response from the check before consul fails the check
InitialStatus string // Initial status of the check
Expand Down

0 comments on commit 9da0de2

Please sign in to comment.