review feedback

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
Bryan Boreham 2024-02-04 15:52:50 +01:00
parent b17f88b7fb
commit 857138d3ce
2 changed files with 3 additions and 3 deletions

View file

@ -358,7 +358,7 @@ func TestInvalidFile(t *testing.T) {
// Verify that we've received nothing.
time.Sleep(defaultWait)
require.False(t, runner.lastReceive().After(now), "Unexpected targets received.")
require.False(t, runner.lastReceive().After(now), "unexpected targets received: %v", runner.targets())
})
}
}

View file

@ -152,8 +152,8 @@ func TestMarathonSDRemoveApp(t *testing.T) {
tg2 := tgs[0]
require.Equal(t, tg1.Source, tg2.Source, "Source is different.")
require.NotEmpty(t, tg2.Targets, "Got a non-empty target set.")
require.Equal(t, tg1.Source, tg2.Source, "Source is different.")
}
func marathonTestAppListWithMultiplePorts(labels map[string]string, runningTasks int) *appList {
@ -307,7 +307,7 @@ func TestMarathonSDSendGroupWithPortDefinitions(t *testing.T) {
tgt = tg.Targets[1]
require.Equal(t, "mesos-slave1:5678", string(tgt[model.AddressLabel]), "Wrong target address.")
require.Equal(t, "", string(tgt[model.LabelName(portMappingLabelPrefix+"prometheus")]), "Wrong portMappings label from the second port.")
require.Empty(t, tgt[model.LabelName(portMappingLabelPrefix+"prometheus")], "Wrong portMappings label from the second port.")
require.Equal(t, "yes", string(tgt[model.LabelName(portDefinitionLabelPrefix+"prometheus")]), "Wrong portDefinitions label from the second port.")
}