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

'NoneType' object is not subscriptable :: Test Case Failing on HCP #11584

Open
nishtha-mishra opened this issue Mar 7, 2025 · 0 comments
Open

Comments

@nishtha-mishra
Copy link

Version: release_4.17
Environment:- HCP with ODF Installed.

Test cases failing::
2025-03-07T11:06:52.714603784Z ERROR tests/functional/object/mcg/test_s3_with_java_sdk.py::TestS3WithJavaSDK::test_s3_upload_with_java[False]
2025-03-07T11:06:52.714603784Z ERROR tests/functional/object/mcg/test_s3_with_java_sdk.py::TestS3WithJavaSDK::test_s3_upload_with_java[True]

2025-03-07T11:06:16.534580846Z self = <ocs_ci.ocs.resources.mcg.MCG object at 0x7f00f4d16140>, args = ()
2025-03-07T11:06:16.534580846Z kwargs = {}
2025-03-07T11:06:16.534580846Z get_noobaa = {'apiVersion': 'v1', 'items': [{'apiVersion': 'noobaa.io/v1alpha1', 'kind': 'NooBaa', 'metadata': {'creationTimestamp'...nitoring'}, 'bucketLogging': {}, 'cleanupPolicy': {}, ...}, ...}], 'kind': 'List', 'metadata': {'resourceVersion': ''}}
2025-03-07T11:06:16.534580846Z
2025-03-07T11:06:16.534580846Z def init(self, *args, **kwargs):
2025-03-07T11:06:16.534580846Z """
2025-03-07T11:06:16.534580846Z Constructor for the MCG class
2025-03-07T11:06:16.534580846Z """
2025-03-07T11:06:16.534580846Z self.namespace = config.ENV_DATA["cluster_namespace"]
2025-03-07T11:06:16.534580846Z self.operator_pod = Pod(
2025-03-07T11:06:16.534580846Z **get_pods_having_label(
2025-03-07T11:06:16.534580846Z constants.NOOBAA_OPERATOR_POD_LABEL, self.namespace
2025-03-07T11:06:16.534580846Z )[0]
2025-03-07T11:06:16.534580846Z )
2025-03-07T11:06:16.534580846Z self.core_pod = Pod(
2025-03-07T11:06:16.534580846Z **get_pods_having_label(constants.NOOBAA_CORE_POD_LABEL, self.namespace)[0]
2025-03-07T11:06:16.534580846Z )
2025-03-07T11:06:16.534580846Z wait_for_resource_state(
2025-03-07T11:06:16.534580846Z resource=self.operator_pod, state=constants.STATUS_RUNNING, timeout=300
2025-03-07T11:06:16.534580846Z )
2025-03-07T11:06:16.534580846Z
2025-03-07T11:06:16.534580846Z if (
2025-03-07T11:06:16.534580846Z not os.path.isfile(constants.NOOBAA_OPERATOR_LOCAL_CLI_PATH)
2025-03-07T11:06:16.534580846Z or self.get_mcg_cli_version().minor
2025-03-07T11:06:16.534580846Z != version.get_semantic_ocs_version_from_config().minor
2025-03-07T11:06:16.534580846Z ):
2025-03-07T11:06:16.534580846Z logger.info(
2025-03-07T11:06:16.534580846Z "The expected MCG CLI binary could not be found,"
2025-03-07T11:06:16.534580846Z " downloading the expected version"
2025-03-07T11:06:16.534580846Z )
2025-03-07T11:06:16.534580846Z retrieve_cli_binary(cli_type="mcg")
2025-03-07T11:06:16.534580846Z
2025-03-07T11:06:16.534580846Z """
2025-03-07T11:06:16.534580846Z The certificate will be copied on each mcg_obj instantiation since
2025-03-07T11:06:16.534580846Z the process is so light and quick, that the time required for the redundant
2025-03-07T11:06:16.534580846Z copy is neglible in comparison to the time a hash comparison will take.
2025-03-07T11:06:16.534580846Z """
2025-03-07T11:06:16.534580846Z retrieve_default_ingress_crt()
2025-03-07T11:06:16.534580846Z
2025-03-07T11:06:16.534580846Z get_noobaa = OCP(kind="noobaa", namespace=self.namespace).get()
2025-03-07T11:06:16.534580846Z
2025-03-07T11:06:16.534580846Z self.s3_endpoint = (
2025-03-07T11:06:16.534580846Z > get_noobaa.get("items")[0]
2025-03-07T11:06:16.534580846Z .get("status")
2025-03-07T11:06:16.534580846Z .get("services")
2025-03-07T11:06:16.534580846Z .get("serviceS3")
2025-03-07T11:06:16.534580846Z .get("externalDNS")[0]
2025-03-07T11:06:16.534580846Z )
2025-03-07T11:06:16.534580846Z E TypeError: 'NoneType' object is not subscriptable
2025-03-07T11:06:16.534580846Z
2025-03-07T11:06:16.534580846Z ocs_ci/ocs/resources/mcg.py:112: TypeError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant