Skip to content

Commit 37c5f6f

Browse files
committed
Integration tests: container cleanup in applier subpackage
The integration testing suite for the applier subpackage creates two containers for each test image, since this is necessary for testing sharding functionality. Upon test completion, both containers are stopped but were not destroyed. However, since all other package/subpackage testing suites only use a single container per image, leaving the second container around is often unnecessary. This commit changes the applier subpackage's testing suite to only keep the first container (per image) around, while destroying the second container.
1 parent 441eed0 commit 37c5f6f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

applier/applier_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,12 @@ func (s *ApplierIntegrationSuite) Teardown(backend string) error {
8888
for n := range s.d {
8989
n := n
9090
g.Go(func() error {
91-
return s.d[n].Stop()
91+
// Only keep the first container; destroy any additional, since the other
92+
// subpackages only use 1 test container
93+
if n == 0 {
94+
return s.d[n].Stop()
95+
}
96+
return s.d[n].Destroy()
9297
})
9398
}
9499
return g.Wait()

0 commit comments

Comments
 (0)