Browse code

TestBuildForceRm: use assert to help debugging failures

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2025/10/31 21:25:33
Showing 1 changed files
... ...
@@ -1169,9 +1169,7 @@ func (s *DockerCLIBuildSuite) TestBuildForceRm(c *testing.T) {
1169 1169
 	}
1170 1170
 
1171 1171
 	containerCountAfter := getContainerCount(c)
1172
-	if containerCountBefore != containerCountAfter {
1173
-		c.Fatalf("--force-rm shouldn't have left containers behind")
1174
-	}
1172
+	assert.Check(c, is.Equal(containerCountBefore, containerCountAfter), "--force-rm shouldn't have left containers behind")
1175 1173
 }
1176 1174
 
1177 1175
 func (s *DockerCLIBuildSuite) TestBuildRm(c *testing.T) {