Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #339 #340

Merged
merged 2 commits into from
Oct 11, 2020
Merged

Issue #339 #340

merged 2 commits into from
Oct 11, 2020

Conversation

zoowirt
Copy link
Contributor

@zoowirt zoowirt commented Oct 7, 2020

Status checks for running postgres depend on pg_ctl status code, not on pg_ctl log language

Fixes #339.

Changes proposed.

Status checks for running postgres depend on pg_ctl status code, not on pg_ctl log language
@coveralls
Copy link

coveralls commented Oct 7, 2020

Coverage Status

Coverage increased (+0.08%) to 59.641% when pulling 5ca8401 on zoowirt:patch-1 into fbced46 on ClearcodeHQ:master.

Copy link
Member

@fizyk fizyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also

  1. with current changes, please check if we can rid of the https://github.com/ClearcodeHQ/pytest-postgresql/blob/master/src/pytest_postgresql/executor.py#L147 usage all together.
  2. Either single test, or separate test env with system locales set to ie german.

if start_info in content:
break
status_code = subprocess.getstatusoutput(
'{pg_ctl} status -D {datadir}'.format(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use f-string

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another question, can we simply rely on self.running method instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only self.running is used now

@@ -176,10 +176,12 @@ def wait_for_postgres(self):
start_info = 'database system is ready to accept connections'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then this won't be needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, line 173, will we need logfile check here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both deleted

@zoowirt
Copy link
Contributor Author

zoowirt commented Oct 9, 2020

The executor is now tested with two environment locales

@zoowirt zoowirt requested a review from fizyk October 9, 2020 06:54
@fizyk fizyk merged commit c1c6112 into ClearcodeHQ:master Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postgres status checks depend on pg_ctl logs language
3 participants