Skip to content

Commit 09fafb9

Browse files
authored
splitted tier tests into tier1, tier2 and tier3 (#3229)
1 parent 412b7e0 commit 09fafb9

File tree

8 files changed

+36
-105
lines changed

8 files changed

+36
-105
lines changed

tests/e2e/cfmap_deletion_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func cfgMapDeletionTestSuite(t *testing.T) {
5858
func (tc *CfgMapDeletionTestCtx) ValidateDSCDeletionUsingConfigMap(t *testing.T) {
5959
t.Helper()
6060

61-
skipUnless(t, Tier1)
61+
skipUnless(t, Tier3)
6262

6363
// Create or update the deletion config map
6464
enableDeletion := "false"
@@ -89,7 +89,7 @@ func (tc *CfgMapDeletionTestCtx) ValidateDSCDeletionUsingConfigMap(t *testing.T)
8989
func (tc *CfgMapDeletionTestCtx) ValidateOwnedNamespacesAllExist(t *testing.T) {
9090
t.Helper()
9191

92-
skipUnless(t, Tier1)
92+
skipUnless(t, Tier3)
9393

9494
// Ensure namespaces with the owned namespace label exist
9595
tc.EnsureResourcesExist(

tests/e2e/controller_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,11 @@ func TestMain(m *testing.M) {
404404
"Specify when to delete DataScienceCluster, DSCInitialization, and controllers. Options: always, on-failure, never.")
405405
checkEnvVarBindingError(viper.BindEnv("deletion-policy", viper.GetEnvPrefix()+"_DELETION_POLICY"))
406406

407-
pflag.String("tag", "All", "Tag to run tests for. Options: All, Smoke, Tier1")
407+
tagNames := make([]string, 0, len(allowedTags))
408+
for _, tag := range allowedTags {
409+
tagNames = append(tagNames, string(tag))
410+
}
411+
pflag.String("tag", "All", "Tag to run tests for. Options: "+strings.Join(tagNames, ", "))
408412
checkEnvVarBindingError(viper.BindEnv("tag", viper.GetEnvPrefix()+"_TAG"))
409413

410414
pflag.Bool("fail-fast-on-error", true, "fail fast on error")

tests/e2e/creation_test.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ type DSCTestCtx struct {
3535
func dscManagementTestSuite(t *testing.T) {
3636
t.Helper()
3737

38+
// disruptive tests are only supported on tier3 clusters
39+
skipUnless(t, Tier3)
40+
3841
// Initialize the test context.
3942
tc, err := NewTestContext(t)
4043
require.NoError(t, err, "Failed to initialize test context")
@@ -106,8 +109,6 @@ func dscWebhookTestSuite(t *testing.T) {
106109
func (tc *DSCTestCtx) ValidateOperatorsInstallation(t *testing.T) {
107110
t.Helper()
108111

109-
skipUnless(t, Smoke)
110-
111112
// Define operators to be installed.
112113
operators := []Operator{
113114
{nn: types.NamespacedName{Name: certManagerOpName, Namespace: certManagerOpNamespace}, skipOperatorGroup: false, globalOperatorGroup: true, channel: certManagerOpChannel},
@@ -123,8 +124,6 @@ func (tc *DSCTestCtx) ValidateOperatorsInstallation(t *testing.T) {
123124
func (tc *DSCTestCtx) ValidateResourcesCreation(t *testing.T) {
124125
t.Helper()
125126

126-
skipUnless(t, Smoke)
127-
128127
tc.EventuallyResourceCreatedOrUpdated(
129128
WithObjectToCreate(CreateJobSetOperator()),
130129
WithCondition(jq.Match(`.status.conditions[] | select(.type == "Available") | .status == "True"`)),
@@ -136,8 +135,6 @@ func (tc *DSCTestCtx) ValidateResourcesCreation(t *testing.T) {
136135
func (tc *DSCTestCtx) ValidateDSCICreation(t *testing.T) {
137136
t.Helper()
138137

139-
skipUnless(t, Smoke)
140-
141138
tc.EventuallyResourceCreatedOrUpdated(
142139
WithObjectToCreate(CreateDSCI(tc.DSCInitializationNamespacedName.Name, tc.AppsNamespace, tc.MonitoringNamespace)),
143140
WithCondition(jq.Match(`.status.phase == "%s"`, status.ConditionTypeReady)),
@@ -153,8 +150,6 @@ func (tc *DSCTestCtx) ValidateDSCICreation(t *testing.T) {
153150
func (tc *DSCTestCtx) ValidateDSCCreation(t *testing.T) {
154151
t.Helper()
155152

156-
skipUnless(t, Smoke)
157-
158153
tc.EventuallyResourceCreatedOrUpdated(
159154
WithObjectToCreate(CreateDSC(tc.DataScienceClusterNamespacedName.Name, tc.WorkbenchesNamespace)),
160155
WithCondition(jq.Match(`.status.phase == "%s"`, status.ConditionTypeReady)),

tests/e2e/deletion_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func deletionTestSuite(t *testing.T) {
3939
func (tc *DeletionTestCtx) TestDSCDeletion(t *testing.T) {
4040
t.Helper()
4141

42-
skipUnless(t, Tier1)
42+
skipUnless(t, Tier3)
4343

4444
// Delete the DataScienceCluster instance
4545
tc.DeleteResource(WithMinimalObject(gvk.DataScienceCluster, tc.DataScienceClusterNamespacedName))
@@ -49,7 +49,7 @@ func (tc *DeletionTestCtx) TestDSCDeletion(t *testing.T) {
4949
func (tc *DeletionTestCtx) TestDSCIDeletion(t *testing.T) {
5050
t.Helper()
5151

52-
skipUnless(t, Tier1)
52+
skipUnless(t, Tier3)
5353

5454
// Delete the DSCInitialization instance
5555
tc.DeleteResource(WithMinimalObject(gvk.DSCInitialization, tc.DSCInitializationNamespacedName))

0 commit comments

Comments
 (0)