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

Standard Tests: store/display contexts on test failures #2184 #2951

Merged
merged 3 commits into from
Apr 19, 2021

Conversation

keu
Copy link
Contributor

@keu keu commented Apr 19, 2021

closes #2184

What

Describe what the change is solving
It helps to add screenshots if it affects the frontend.

How

Describe the solution

Pre-merge Checklist

  • Run integration tests
  • Publish Docker images

Recommended reading order

  1. test.java
  2. component.ts
  3. the rest

@keu keu requested review from sherifnada and yevhenii-ldv and removed request for jrhizor and ChristopheDuong April 19, 2021 18:00
@keu keu linked an issue Apr 19, 2021 that may be closed by this pull request
logging.info("Running docker, folders: %s", volumes)
logging.info("Docker run: \n%s\ninput: %s\noutput: %s", cmd, self.input_folder, self.output_folder)

with open(str(self.output_folder / "raw"), "wb+") as f:
Copy link
Contributor

Choose a reason for hiding this comment

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

How can we prevent this from filling up disk space over time? maybe output should live in /tmp by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

output and input folders are in /tmp by default, we take base folder from
tmp_path fixture (builtin pytest fixture)

    """Return a temporary directory path object which is unique to each test
    function invocation, created as a sub directory of the base temporary
    directory.
    """

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so the output looks like this

INFO     root:connector_runner.py:108 Docker run:
read --config tap_config.json --catalog catalog.json
input: /tmp/pytest-of-root/pytest-141/test_two_sequential_reads_inpu0/run_1/input
output: /tmp/pytest-of-root/pytest-141/test_two_sequential_reads_inpu0/run_1/output

Copy link
Contributor

Choose a reason for hiding this comment

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

great!

@keu keu merged commit 07c606c into keu/standard-python-tests Apr 19, 2021
@keu keu deleted the keu/standard-tests-save-output branch April 19, 2021 18:40
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.

Standard Tests: store/display contexts on test failures
3 participants