-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCM-9774 | ci: Automate ids:54413,56783,56786,63169,63174,76056
- https://issues.redhat.com/browse/OCM-9774 - https://issues.redhat.com/browse/OCM-10962 - https://issues.redhat.com/browse/OCM-10999
- Loading branch information
Showing
8 changed files
with
466 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package e2e | ||
|
||
import ( | ||
"encoding/json" | ||
|
||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
|
||
"github.com/openshift/rosa/tests/ci/labels" | ||
"github.com/openshift/rosa/tests/utils/common" | ||
"github.com/openshift/rosa/tests/utils/exec/rosacli" | ||
) | ||
|
||
var _ = Describe("Tuning Config(s) on Classic cluster", labels.Feature.TuningConfigs, func() { | ||
|
||
var rosaClient *rosacli.Client | ||
var clusterService rosacli.ClusterService | ||
|
||
BeforeEach(func() { | ||
Expect(clusterID).ToNot(BeEmpty(), "Cluster ID is empty, please export the env variable CLUSTER_ID") | ||
rosaClient = rosacli.NewClient() | ||
clusterService = rosaClient.Cluster | ||
|
||
By("Skip testing if the cluster is not a Classic cluster") | ||
hosted, err := clusterService.IsHostedCPCluster(clusterID) | ||
Expect(err).ToNot(HaveOccurred()) | ||
if hosted { | ||
SkipNotClassic() | ||
} | ||
}) | ||
|
||
AfterEach(func() { | ||
By("Clean remaining resources") | ||
err := rosaClient.CleanResources(clusterID) | ||
Expect(err).ToNot(HaveOccurred()) | ||
}) | ||
|
||
It("is not supported - [id:76056]", | ||
labels.Medium, labels.Runtime.Day2, | ||
func() { | ||
tuningConfigService := rosaClient.TuningConfig | ||
tcName := common.GenerateRandomName("tuned01", 2) | ||
tcSpec := rosacli.NewTuningConfigSpecRootStub(tcName, 25, 10) | ||
|
||
By("Create tuning config should fail") | ||
tcJSON, err := json.Marshal(tcSpec) | ||
Expect(err).ToNot(HaveOccurred()) | ||
_, err = tuningConfigService.CreateTuningConfigFromSpecContent( | ||
clusterID, | ||
tcName, | ||
string(tcJSON)) | ||
Expect(err).To(HaveOccurred()) | ||
Expect(err.Error()).To(ContainSubstring("This command is only supported for Hosted Control Planes")) | ||
}) | ||
}) |
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.