def ensure_sa_secret(strict=False): """Method creates a secret with MoM-EE service account private key. It relies on the global `install_enterprise_cli` fixture to install the enterprise-cli-package. """ if common.has_secret(MOM_EE_SERVICE_ACCOUNT_SECRET_NAME): common.delete_secret(MOM_EE_SERVICE_ACCOUNT_SECRET_NAME) common.create_sa_secret(MOM_EE_SERVICE_ACCOUNT_SECRET_NAME, MOM_EE_SERVICE_ACCOUNT, strict) assert common.has_secret(MOM_EE_SERVICE_ACCOUNT_SECRET_NAME)
def ensure_sa_secret(strict=False): if common.has_secret(MOM_EE_SERVICE_ACCOUNT_SECRET_NAME): common.delete_secret(MOM_EE_SERVICE_ACCOUNT_SECRET_NAME) common.create_sa_secret(MOM_EE_SERVICE_ACCOUNT_SECRET_NAME, MOM_EE_SERVICE_ACCOUNT, strict) assert common.has_secret(MOM_EE_SERVICE_ACCOUNT_SECRET_NAME)