diff options
Diffstat (limited to 'extras/hs-test/hst_suite.go')
-rw-r--r-- | extras/hs-test/hst_suite.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/extras/hs-test/hst_suite.go b/extras/hs-test/hst_suite.go index ff7024582dc..8e52cc4e851 100644 --- a/extras/hs-test/hst_suite.go +++ b/extras/hs-test/hst_suite.go @@ -19,6 +19,7 @@ const ( var IsPersistent = flag.Bool("persist", false, "persists topology config") var IsVerbose = flag.Bool("verbose", false, "verbose test output") +var IsUnconfiguring = flag.Bool("unconfigure", false, "remove topology") type HstSuite struct { suite.Suite @@ -42,7 +43,14 @@ func (s *HstSuite) TearDownTest() { s.RemoveVolumes() } +func (s *HstSuite) skipIfUnconfiguring() { + if *IsUnconfiguring { + s.skip("skipping to unconfigure") + } +} + func (s *HstSuite) SetupTest() { + s.skipIfUnconfiguring() s.SetupVolumes() s.SetupContainers() } @@ -111,7 +119,7 @@ func (s *HstSuite) assertNotEmpty(object interface{}, msgAndArgs ...interface{}) func (s *HstSuite) log(args ...any) { if *IsVerbose { - s.T().Helper() + s.T().Helper() s.T().Log(args...) } } @@ -223,6 +231,10 @@ func (s *HstSuite) loadNetworkTopology(topologyName string) { func (s *HstSuite) configureNetworkTopology(topologyName string) { s.loadNetworkTopology(topologyName) + if *IsUnconfiguring { + return + } + for _, nc := range s.netConfigs { if err := nc.Configure(); err != nil { s.T().Fatalf("network config error: %v", err) |