Skip to content

Commit

Permalink
wip fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig committed Apr 20, 2022
1 parent 79092a5 commit f8ec991
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions command/service_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ func TestServiceInfoCommand_Run(t *testing.T) {

// Create a test job with a Nomad service.
testJob := testJob("service-discovery-nomad-info")
testJob.TaskGroups[0].Tasks[0].Services = []*api.Service{
{Name: "service-discovery-nomad-info", Provider: "nomad", Tags: []string{"foo", "bar"}}}
testJob.TaskGroups[0].Services = []*api.Service{
{Name: "service-discovery-nomad-info", Provider: "nomad", PortLabel: "9999", Tags: []string{"foo", "bar"}}}

// Register that job.
regResp, _, err := client.Jobs().Register(testJob, nil)
Expand Down Expand Up @@ -95,7 +95,7 @@ func TestServiceInfoCommand_Run(t *testing.T) {
if !assert.Contains(t, s, "service-discovery-nomad-info") {
return false
}
if !assert.Contains(t, s, ":0") {
if !assert.Contains(t, s, ":9999") {
return false
}
if !assert.Contains(t, s, "[foo,bar]") {
Expand All @@ -114,7 +114,7 @@ func TestServiceInfoCommand_Run(t *testing.T) {
require.Contains(t, s, "Namespace = default")
require.Contains(t, s, "Job ID = service-discovery-nomad-info")
require.Contains(t, s, "Datacenter = dc1")
require.Contains(t, s, "Address = :0")
require.Contains(t, s, "Address = :9999")
require.Contains(t, s, "Tags = [foo,bar]")

ui.OutputWriter.Reset()
Expand Down

0 comments on commit f8ec991

Please sign in to comment.