Skip to content

Commit

Permalink
oops, others should not run everything
Browse files Browse the repository at this point in the history
  • Loading branch information
dnr committed Oct 25, 2024
1 parent 16039b9 commit ead946f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/testcore/functional_test_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ var (
"TestAdvancedVisibilitySuite",
"TestClientMiscTestSuite",
}

FixedMatchingBehaviorNone = &matchingBehaviorOptions{}
)

// WithFxOptionsForService returns an Option which, when passed as an argument to setupSuite, will append the given list
Expand Down Expand Up @@ -522,7 +524,9 @@ func (s *FunctionalTestBase) GetNamespaceID(namespace string) string {
}

func (s *FunctionalTestBase) RunTestWithMatchingBehavior(subtest func()) {
if s.fixedMatchingBehavior != nil {
if s.fixedMatchingBehavior == FixedMatchingBehaviorNone {
s.T().Skipf("%s runs in a MB subtest", s.T().Name())
} else if s.fixedMatchingBehavior != nil {
s.runOneTestWithMatchingBehavior(subtest, s.fixedMatchingBehavior)
} else {
for _, mbo := range AllMatchingBehaviorOptions() {
Expand Down Expand Up @@ -578,7 +582,7 @@ func (s *FunctionalTestBase) SetFixedMatchingBehavior(mbo *matchingBehaviorOptio
}

func (s *FunctionalTestBase) SkipIfFixedMatchingBehavior() {
if s.fixedMatchingBehavior != nil {
if s.fixedMatchingBehavior != nil && s.fixedMatchingBehavior != FixedMatchingBehaviorNone {
s.T().Skipf("%s runs in 'Others' subtest", s.T().Name())
}
}
Expand Down
2 changes: 2 additions & 0 deletions tests/versioning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ func TestVersioningSuite(t *testing.T) {
t.Run("Others", func(t *testing.T) {
// This sub-test runs all tests that do _not_ use RunTestWithMatchingBehavior.
t.Parallel()
s := new(VersioningIntegSuite)
s.SetFixedMatchingBehavior(testcore.FixedMatchingBehaviorNone)
suite.Run(t, new(VersioningIntegSuite))
})
}
Expand Down

0 comments on commit ead946f

Please sign in to comment.