Skip to content

Commit

Permalink
Fixed integration tests (#462)
Browse files Browse the repository at this point in the history
Co-authored-by: aleksvagachev <[email protected]>
  • Loading branch information
aleksvagachev and aleksvagachev authored May 9, 2023
1 parent e6bc2b3 commit 8dbc629
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
12 changes: 0 additions & 12 deletions plugins/modules/postgresql_privs.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,18 +494,6 @@ class Connection(object):
def __init__(self, params, module):
self.database = params.database
self.module = module
# To use defaults values, keyword arguments must be absent, so
# check which values are empty and don't include in the **kw
# dictionary
params_map = {
"login_host": "host",
"login_user": "user",
"login_password": "password",
"port": "port",
"database": "database",
"ssl_mode": "sslmode",
"ca_cert": "sslrootcert"
}

conn_params = get_conn_params(module, params.__dict__, warn_db_default=False)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
- name: Set table default privs on the schema with hyphen in the name
postgresql_privs:
login_user: "{{ pg_user }}"
password: password
login_password: password
db: "{{ db_name_with_hyphens }}"
schema: "{{ db_schema_with_hyphens }}"
role: "{{ db_user_with_hyphens }}"
Expand All @@ -109,7 +109,7 @@
- name: Set table default privs on the schema with hyphen in the name
postgresql_privs:
login_user: "{{ pg_user }}"
password: password
login_password: password
db: "{{ db_name_with_hyphens }}"
schema: "{{ db_schema_with_hyphens }}"
role: "{{ db_user_with_hyphens }}"
Expand All @@ -128,7 +128,7 @@
- name: Delete table default privs on the schema with hyphen in the name
postgresql_privs:
login_user: "{{ pg_user }}"
password: password
login_password: password
db: "{{ db_name_with_hyphens }}"
schema: "{{ db_schema_with_hyphens }}"
role: "{{ db_user_with_hyphens }}"
Expand Down Expand Up @@ -160,7 +160,7 @@
name: "{{ db_user_with_hyphens }}"
state: absent
encrypted: true
password: password
login_password: password
role_attr_flags: CREATEDB,LOGIN
db: "{{ db_name_with_hyphens }}"
login_user: "{{ pg_user }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@
privs: "CREATE,connect"
objs: "{{ db_name }}"
db: "{{ db_name }}"
login: "{{ db_user1 }}"
password: "password"
host: "localhost"
login_user: "{{ db_user1 }}"
login_password: "password"
login_host: "localhost"

- name: Check that the user has the requested permissions (database)
become: true
Expand Down

0 comments on commit 8dbc629

Please sign in to comment.