def clean_migrated_mongo(clean_mongo): deviceauth_cli = CliDeviceauth() useradm_cli = CliUseradm() deviceauth_cli.migrate() useradm_cli.migrate() yield clean_mongo
def clean_migrated_mongo_mt(clean_mongo): deviceauth_cli = CliDeviceauth() useradm_cli = CliUseradm() for t in ['tenant1', 'tenant2']: deviceauth_cli.migrate(t) useradm_cli.migrate(t) yield clean_mongo
def clean_migrated_mongo(clean_mongo): useradm_cli = CliUseradm() depl_cli = CliDeployments() useradm_cli.migrate() depl_cli.migrate() yield clean_mongo
def create_user(name: str, pwd: str, tid: str = "", containers_namespace: str = "backend-tests") -> User: cli = CliUseradm(containers_namespace) uid = cli.create_user(name, pwd, tid) return User(uid, name, pwd)
def clean_migrated_mongo(clean_mongo): useradm_cli = CliUseradm() tenantadm_cli = CliTenantadm() for t in ['tenant1', 'tenant2']: useradm_cli.migrate(t) tenantadm_cli.migrate() yield clean_mongo
def clean_migrated_mongo_mt(clean_mongo): deviceauth_cli = CliDeviceauth() useradm_cli = CliUseradm() tenantadm_cli = CliTenantadm() for t in ["tenant1", "tenant2"]: deviceauth_cli.migrate(t) useradm_cli.migrate(t) tenantadm_cli.migrate() yield clean_mongo
def create_user(name, pwd, tid='', docker_prefix=None): cli = CliUseradm(docker_prefix) uid = cli.create_user(name, pwd, tid) return User(uid, name, pwd)
def create_user(self, username, password, tenant_id=""): namespace = get_container_manager().name cli = CliUseradm(containers_namespace=namespace) cli.create_user(username, password, tenant_id)
def clean_migrated_mongo(clean_mongo): CliDeviceauth().migrate() CliUseradm().migrate() CliDeviceMonitor().migrate() yield clean_mongo