|
|
|
@ -21,7 +21,7 @@ def test_api_create_psql_db(cfg, client, g_admin_ctx, create_user_result): |
|
|
|
|
assert status == 409 |
|
|
|
|
|
|
|
|
|
# normal user cannot create db for others |
|
|
|
|
status, data = client.post(f"/api/postgresql/someone_else", json={}, principal=uid) |
|
|
|
|
status, data = client.post("/api/postgresql/someone_else", json={}, principal=uid) |
|
|
|
|
assert status == 403 |
|
|
|
|
|
|
|
|
|
# cannot create db for user not in ldap |
|
|
|
@ -84,9 +84,9 @@ def test_api_passwd_reset_psql(cfg, client, g_admin_ctx, create_user_result): |
|
|
|
|
old_passwd = data['password'] |
|
|
|
|
|
|
|
|
|
con = connect( |
|
|
|
|
host=cfg.get('ceod_database_host'), |
|
|
|
|
user=uid, |
|
|
|
|
password=old_passwd, |
|
|
|
|
host=cfg.get('ceod_database_host'), |
|
|
|
|
user=uid, |
|
|
|
|
password=old_passwd, |
|
|
|
|
) |
|
|
|
|
con.close() |
|
|
|
|
|
|
|
|
@ -103,7 +103,7 @@ def test_api_passwd_reset_psql(cfg, client, g_admin_ctx, create_user_result): |
|
|
|
|
assert status == 403 |
|
|
|
|
|
|
|
|
|
# cannot password reset a user that does not have a database |
|
|
|
|
status, data = client.post(f"/api/postgresql/someone_else/pwreset", json={}) |
|
|
|
|
status, data = client.post("/api/postgresql/someone_else/pwreset", json={}) |
|
|
|
|
assert status == 404 |
|
|
|
|
|
|
|
|
|
con = connect( |
|
|
|
|