Skip to content

Commit

Permalink
Merge branch 'main' into qe-op-installation
Browse files Browse the repository at this point in the history
  • Loading branch information
bnshr committed Feb 19, 2025
2 parents 0422dfc + 9b4a9ab commit d970e3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
30 changes: 4 additions & 26 deletions tests/operator/tests/operator_install_status_no_privileges.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,26 +74,6 @@ var _ = Describe("Operator install-status-no-privileges,", func() {
randomNamespace)
Expect(err).ToNot(HaveOccurred(), "Operator "+tsparams.OperatorPrefixQuay+
" is not ready")

// kiali operator has resourceNames under its rules
By("Deploy kiali operator for testing")
err = tshelper.DeployOperatorSubscription(
"kiali",
"kiali",
"alpha",
randomNamespace,
tsparams.CommunityOperatorGroup,
tsparams.OperatorSourceNamespace,
"",
v1alpha1.ApprovalAutomatic,
)
Expect(err).ToNot(HaveOccurred(), ErrorDeployOperatorStr+
tsparams.OperatorPrefixKiali)

err = tshelper.WaitUntilOperatorIsReady(tsparams.OperatorPrefixKiali,
randomNamespace)
Expect(err).ToNot(HaveOccurred(), "Operator "+tsparams.OperatorPrefixKiali+
" is not ready")
})

AfterEach(func() {
Expand Down Expand Up @@ -155,14 +135,13 @@ var _ = Describe("Operator install-status-no-privileges,", func() {

// 66383
It("one operator with clusterPermissions and resourceNames [negative]", func() {
By("Label operator")
Eventually(func() error {
return tshelper.AddLabelToInstalledCSV(
tsparams.OperatorPrefixKiali,
tsparams.OperatorPrefixCloudbees,
randomNamespace,
tsparams.OperatorLabel)
}, tsparams.TimeoutLabelCsv, tsparams.PollingInterval).Should(Not(HaveOccurred()),
ErrorLabelingOperatorStr+tsparams.OperatorPrefixKiali)
ErrorLabelingOperatorStr+tsparams.OperatorPrefixCloudbees)

By("Start test")
err := globalhelper.LaunchTests(
Expand Down Expand Up @@ -215,14 +194,13 @@ var _ = Describe("Operator install-status-no-privileges,", func() {

// 66385
It("two operators, one with clusterPermissions and resourceNames", func() {
By("Label operators")
Eventually(func() error {
return tshelper.AddLabelToInstalledCSV(
tsparams.OperatorPrefixKiali,
tsparams.OperatorPrefixCloudbees,
randomNamespace,
tsparams.OperatorLabel)
}, tsparams.TimeoutLabelCsv, tsparams.PollingInterval).Should(Not(HaveOccurred()),
ErrorLabelingOperatorStr+tsparams.OperatorPrefixKiali)
ErrorLabelingOperatorStr+tsparams.OperatorPrefixCloudbees)

Eventually(func() error {
return tshelper.AddLabelToInstalledCSV(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ func createTestOperatorGroup(namespace, operatorGroupName string, targetNamespac
By("Create target namespaces")
for _, targetNamespace := range targetNamespaces {

Check failure on line 333 in tests/operator/tests/operator_single_or_multi_namespaced_allowed_in_tenant_namespaces.go

View workflow job for this annotation

GitHub Actions / lint

ranges should only be cuddled with assignments used in the iteration (wsl)
err := globalhelper.CreateNamespace(targetNamespace)

Expect(err).ToNot(HaveOccurred(), "Error creating namespace "+targetNamespace)
}

Expand All @@ -351,7 +350,7 @@ func createTestOperatorGroup(namespace, operatorGroupName string, targetNamespac

func installAndLabelOperator(operatorNamespace string) {
By("Query the packagemanifest for the default channel")
channel, err := globalhelper.QueryPackageManifestForDefaultChannel( //nolint:wsl
channel, err := globalhelper.QueryPackageManifestForDefaultChannel(
tsparams.CertifiedOperatorPrefixNginx,
operatorNamespace,
)
Expand Down

0 comments on commit d970e3e

Please sign in to comment.