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

GSS bz-2274193 noobaa db cleartext postgres password #9806

Merged
merged 8 commits into from
May 20, 2024
Merged
Changes from 3 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import logging

from ocs_ci.framework.testlib import tier2, BaseTest, bugzilla
from ocs_ci.framework.pytest_customization.marks import green_squad
from ocs_ci.framework import config
from ocs_ci.ocs.resources import pod


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this test under MCG.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

log = logging.getLogger(__name__)


@tier2
@bugzilla("2274193")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we dont need this redundant bugzilla markers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

class TestNoobaaSecurity(BaseTest):
"""
Test Noobaa Security
"""

@green_squad
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move this test under mcg and add red_squad, mcg markers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@bugzilla("2274193")
def test_noobaa_db_cleartext_postgres_password(self):
"""
1.Get noobaa deb pod
sagihirshfeld marked this conversation as resolved.
Show resolved Hide resolved
2.Get logs from all containers in pod oc logs "noobaa-db-pg-0 --all-containers"
3.Verify postgres password does not exist in noobaa-db pod logs
"""
nooobaa_db_pod_obj = pod.get_noobaa_db_pod()
log.info(
"Get logs from all containers in pod 'oc logs noobaa-db-pg-0 --all-containers'"
)
nooobaa_db_pod_logs = pod.get_pod_logs(
pod_name=nooobaa_db_pod_obj.name,
namespace=config.ENV_DATA["cluster_namespace"],
all_containers=True,
)
log.info("Verify postgres password does not exist in noobaa-db pod logs")
assert "set=password" not in nooobaa_db_pod_logs
Loading