forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cockroachdb#112394 from RaduBerinde/backport23.1-1…
…10687 release-23.1: roachtest: add CompatibleClouds and Suites to TestSpec
- Loading branch information
Showing
124 changed files
with
1,704 additions
and
861 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2023 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
package registry | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestCloudSet(t *testing.T) { | ||
expect := func(c CloudSet, exp string) { | ||
require.Equal(t, exp, c.String()) | ||
} | ||
expect(AllClouds, "local,gce,aws,azure") | ||
expect(AllExceptAWS, "local,gce,azure") | ||
expect(AllExceptLocal, "gce,aws,azure") | ||
expect(AllExceptLocal.NoAWS(), "gce,azure") | ||
expect(AllClouds.NoAWS().NoAzure(), "local,gce") | ||
|
||
require.True(t, AllExceptAWS.Contains(spec.GCE)) | ||
require.True(t, AllExceptAWS.Contains(spec.Local)) | ||
require.False(t, AllExceptAWS.Contains(spec.AWS)) | ||
} | ||
|
||
func TestSuiteSet(t *testing.T) { | ||
expect := func(c SuiteSet, exp string) { | ||
require.Equal(t, exp, c.String()) | ||
} | ||
s := Suites(Nightly, Weekly) | ||
expect(s, "nightly,weekly") | ||
require.True(t, s.Contains(Nightly)) | ||
require.True(t, s.Contains(Weekly)) | ||
require.False(t, s.Contains(ReleaseQualification)) | ||
expect(ManualOnly, "<none>") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.