Hold the expiry of a pending assignment to the words it has said since R4g: its last build, when, and that it failed (issue 1938)
The test was kept from older runs and ran again only once the inventory changed beneath it; e419d018 changed the words.
This commit is contained in:
@@ -151,7 +151,9 @@ func TestAPendingAssignmentExpiresWhenItsBuildFails(t *testing.T) {
|
||||
if len(pending) != 1 || pending[0].State != inventory.PendingExpired {
|
||||
t.Fatalf("pending after a failed build: %+v", pending)
|
||||
}
|
||||
for _, want := range []string{"expired", "build b-modules/sensors of modules/sensors failed",
|
||||
// Its words since R4g (whyNotBuilt): the build, when it was heard, and that it failed (issue 1938: kept from an older
|
||||
// run until the inventory changed beneath it).
|
||||
for _, want := range []string{"expired", "modules/sensors in novox/mesh-catalog; its last build, b-modules/sensors at", ", failed: go build",
|
||||
"undefined: sensorsRead", "nothing was assigned", "build \"true\""} {
|
||||
if !strings.Contains(pending[0].Note, want) {
|
||||
t.Fatalf("the expiry does not say %q: %s", want, pending[0].Note)
|
||||
|
||||
Reference in New Issue
Block a user