Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : QE - Validation of operator installation in tenant operator namespace #1084

Merged
merged 4 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ linters-settings:
line-length: 135
wsl:
strict-append: false
allow-assign-and-anything: true
gocognit:
min-complexity: 36
gofmt:
Expand Down
13 changes: 13 additions & 0 deletions tests/operator/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,16 @@ func updateCsv(namespace string, csv *v1alpha1.ClusterServiceVersion) error {

return nil
}

func DeployTestOperatorGroupWithTargetNamespace(operatorGroupName, namespace string, targetNamespaces []string) error {
if globalhelper.IsOperatorGroupInstalled(operatorGroupName,
namespace) != nil {
return globalhelper.DeployOperatorGroup(namespace,
utils.DefineOperatorGroup(operatorGroupName,
namespace,
targetNamespaces),
)
}

return nil
}
31 changes: 20 additions & 11 deletions tests/operator/parameters/parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,30 @@ var (
SubscriptionNameOpenvino = "ovms-operator-subscription"
UncertifiedOperatorPrefixCockroach = "cockroachdb"
CertifiedOperatorPrefixCockroachCertified = "cockroach-operator"
SingleOrMultiNamespacedOperatorGroup = "single-or-multi-og"

TestDeploymentLabels = map[string]string{
testPodLabelPrefixName: testPodLabelValue,
"app": "test",
}

TestPodName = "operator-test-pod"
)

const (
OperatorNamespace = "operator-ns"

// Certsuite test case names.
CertsuiteOperatorInstallSource = "operator-install-source"
CertsuiteOperatorInstallStatusNoPrivileges = "operator-install-status-no-privileges"
CertsuiteOperatorInstallStatus = "operator-install-status-succeeded"
CertsuiteOperatorSemanticVersioning = "operator-semantic-versioning"
CertsuiteOperatorCrdVersioning = "operator-crd-versioning"
CertsuiteOperatorCrdOpenAPISchema = "operator-crd-openapi-schema"
CertsuiteOperatorNonRoot = "operator-run-as-non-root"
CertsuiteOperatorPodAutomountToken = "operator-automount-tokens"
CertsuiteOperatorPodRunAsUserID = "operator-run-as-user-id"
CertsuiteOperatorMultipleInstalled = "operator-multiple-same-operators"
CertsuiteOperatorBundleCount = "operator-catalogsource-bundle-count"
CertsuiteOperatorInstallSource = "operator-install-source"
CertsuiteOperatorInstallStatusNoPrivileges = "operator-install-status-no-privileges"
CertsuiteOperatorInstallStatus = "operator-install-status-succeeded"
CertsuiteOperatorSemanticVersioning = "operator-semantic-versioning"
CertsuiteOperatorCrdVersioning = "operator-crd-versioning"
CertsuiteOperatorCrdOpenAPISchema = "operator-crd-openapi-schema"
CertsuiteOperatorSingleOrMultiNamespacedAllowedInTenantNamespaces = "operator-single-or-multi-namespaced-allowed-in-tenant-namespaces"
CertsuiteOperatorNonRoot = "operator-run-as-non-root"
CertsuiteOperatorPodAutomountToken = "operator-automount-tokens"
CertsuiteOperatorPodRunAsUserID = "operator-run-as-user-id"
CertsuiteOperatorMultipleInstalled = "operator-multiple-same-operators"
CertsuiteOperatorBundleCount = "operator-catalogsource-bundle-count"
)
Loading