Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Add openshift SCC zookeeper #4787

Merged
merged 1 commit into from
Jun 3, 2022
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
5 changes: 5 additions & 0 deletions tests/e2e/e2e_statefulsets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ var _ = OSMDescribe("Test traffic among Statefulset members",
chart, err := loader.Load(chartPath)
Expect(err).NotTo(HaveOccurred())

if Td.DeployOnOpenShift {
err = Td.AddOpenShiftSCC("privileged", saName, testNS)
Expect(err).NotTo(HaveOccurred())
}

// Install zookeeper
_, err = install.Run(chart, map[string]interface{}{
"replicaCount": replicaCount,
Expand Down
4 changes: 2 additions & 2 deletions tests/framework/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -1554,8 +1554,8 @@ func (td *OsmTestData) GrabLogs() error {
return nil
}

// addOpenShiftSCC adds the specified SecurityContextConstraint to the given service account
func (td *OsmTestData) addOpenShiftSCC(scc, serviceAccount, namespace string) error {
// AddOpenShiftSCC adds the specified SecurityContextConstraint to the given service account
func (td *OsmTestData) AddOpenShiftSCC(scc, serviceAccount, namespace string) error {
if !td.DeployOnOpenShift {
return errors.Errorf("Tests are not configured for OpenShift. Try again with -deployOnOpenShift=true")
}
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/common_apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (td *OsmTestData) CreateServiceAccount(ns string, svcAccount *corev1.Servic
return nil, err
}
if Td.DeployOnOpenShift {
err = Td.addOpenShiftSCC("privileged", svcAc.Name, svcAc.Namespace)
err = Td.AddOpenShiftSCC("privileged", svcAc.Name, svcAc.Namespace)
return svcAc, err
}
return svcAc, nil
Expand Down