Skip to content

Commit

Permalink
amend postgres molecule tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alxgomz committed Jun 19, 2023
1 parent c068580 commit 212266d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions roles/postgres/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,3 @@ provisioner:
host_vars: host_vars
verifier:
name: testinfra
env:
TEST_IMAGE: $MOLECULE_ROLE_IMAGE
2 changes: 1 addition & 1 deletion roles/postgres/molecule/default/tests/test_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
def test_postgresql_service(host):
"""Ensure postgres is up and basic functionality is working"""
pghost = host.ansible.get_variables()['inventory_hostname']
if os.environ['TEST_IMAGE'].startswith('ubuntu'):
if not host.file('/etc/redhat-release').exists:
service_name = 'postgresql'
else:
postgres_version = host.ansible.get_variables()['dependencies_version']['postgres_major_version']
Expand Down

0 comments on commit 212266d

Please sign in to comment.