Skip to content

Commit 116b27d

Browse files
committed
Tests fail when label is not found
1 parent 549bfb6 commit 116b27d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/integrations/legacy/runner_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,8 @@ func (rs *RunnerSuite) TestPluginHandleOutputV1(c *C) {
703703

704704
if expectedValue, exists := expectedLabelValues[id]; exists {
705705
c.Assert(value, Equals, expectedValue)
706+
} else {
707+
c.Fatalf("Expected label: %v not found in Inventory", id)
706708
}
707709
}
708710
}
@@ -1620,6 +1622,8 @@ func TestEmitPayloadV2NoDisplayNameNoEntityName(t *testing.T) {
16201622

16211623
if expectedValue, exists := expectedLabelValues[id]; exists {
16221624
assert.EqualValues(t, value, expectedValue)
1625+
} else {
1626+
assert.Fail(t, "Expected label not found in Inventory", "Label: %s not found in inventory", id)
16231627
}
16241628
}
16251629
}
@@ -1643,6 +1647,8 @@ func TestEmitPayloadV2NoDisplayNameNoEntityName(t *testing.T) {
16431647

16441648
if expectedValue, exists := expectedLabelValues[id]; exists {
16451649
assert.EqualValues(t, value, expectedValue)
1650+
} else {
1651+
assert.Fail(t, "Expected label not found in Inventory", "Label: %s not found in inventory", id)
16461652
}
16471653
}
16481654
}

0 commit comments

Comments
 (0)