def test_validate_secrets_with_config_no_topologies(self):
     secrets = get_fake_secret_config(supported_topologies=None)
     self._test_validate_secrets_validation_errors(secrets)
     secrets = get_fake_secret_config(supported_topologies=[])
     self._test_validate_secrets_validation_errors(secrets)
     secrets = get_fake_secret_config(supported_topologies=[{}])
     self._test_validate_secrets_validation_errors(secrets)
 def test_get_array_connection_info_from_secrets(self):
     secrets = get_fake_secret_config()
     self._test_get_array_connection_info_from_secrets(secrets, system_id="u1")
     secrets = {"username": user, "password": password, "management_address": array}
     self._test_get_array_connection_info_from_secrets(secrets)
     secrets = get_fake_secret_config(supported_topologies=[{"topology.kubernetes.io/test": "zone1"}])
     self._test_get_array_connection_info_from_secrets(secrets,
                                                       topologies={"topology.kubernetes.io/test": "zone1",
                                                                   "topology.block.csi.ibm.com/test": "dev1"})
 def _test_validate_secrets_with_config_invalid_system_id(self, system_id):
     secrets = get_fake_secret_config(system_id=system_id)
     self._test_validate_secrets_validation_errors(secrets)
 def _test_validate_secrets_with_config_valid_system_id(self, system_id):
     secrets = get_fake_secret_config(system_id=system_id)
     utils.validate_secrets(secrets)
 def test_validate_secrets_with_config_invalid_secret(self):
     secrets = get_fake_secret_config(password=None)
     self._test_validate_secrets_validation_errors(secrets)
 def test_validate_secrets_with_config(self):
     secrets = get_fake_secret_config()
     utils.validate_secrets(secrets)