-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verify noobaa root secrets are not publicly exposed (#8981)
Signed-off-by: Mahesh Shetty <[email protected]>
- Loading branch information
1 parent
f287f1f
commit 10008ec
Showing
4 changed files
with
114 additions
and
0 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
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
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
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,48 @@ | ||
import logging | ||
|
||
from ocs_ci.framework.pytest_customization.marks import ( | ||
tier2, | ||
bugzilla, | ||
polarion_id, | ||
red_squad, | ||
mcg, | ||
) | ||
from ocs_ci.ocs.ocp import OCP | ||
from ocs_ci.ocs import constants | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
@tier2 | ||
@mcg | ||
@red_squad | ||
@bugzilla("2246328") | ||
@polarion_id("OCS-5216") | ||
def test_s3_regenerate_creds(mcg_obj, project_factory): | ||
""" | ||
Test s3 regenerate credential | ||
""" | ||
|
||
# create a custom namespace | ||
proj_name = "reg-project" | ||
logger.info(f"Creating the project {proj_name}") | ||
project_factory(project_name=proj_name) | ||
|
||
# create obc in that namespace | ||
ocp_obj = OCP(kind="obc", namespace=proj_name) | ||
obc_name = "reg-obc" | ||
logger.info(f"Creating OBC {obc_name}") | ||
mcg_obj.exec_mcg_cmd( | ||
cmd=f"obc create {obc_name} --app-namespace {proj_name}", | ||
namespace=constants.OPENSHIFT_STORAGE_NAMESPACE, | ||
) | ||
ocp_obj.get(resource_name=obc_name) | ||
|
||
# regenerate credential | ||
mcg_obj.exec_mcg_cmd( | ||
cmd=f"obc regenerate {obc_name} --app-namespace {proj_name}", | ||
namespace=constants.OPENSHIFT_STORAGE_NAMESPACE, | ||
use_yes=True, | ||
) | ||
logger.info("Successfully regenerated s3 credentials") |