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

[CT-1016] [Bug] test tmp files aren't cleaned up when running /tests/functional/simple_seed #5631

Closed
2 tasks done
iknox-fa opened this issue Aug 9, 2022 · 2 comments
Closed
2 tasks done
Labels
repo ci/cd Testing and continuous integration for dbt-core + adapter plugins tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality

Comments

@iknox-fa
Copy link
Contributor

iknox-fa commented Aug 9, 2022

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

After running tests/functional/simple_seed/ a file is found at tests/functional/simple_seed/data/tmp.csv`

Expected Behavior

Running tests doesn't litter the repo with unwanted files.

Steps To Reproduce

/dbt-core/.tox/py-integration/bin/python -m pytest tests/functional/simple_seed
Check to see if file exists at tests/functional/simple_seed/data/tmp.csv

Relevant log output

No response

Environment

- OS:
- Python:
- dbt:

Which database adapter are you using with dbt?

No response

Additional Context

No response

@iknox-fa iknox-fa added bug Something isn't working triage labels Aug 9, 2022
@github-actions github-actions bot changed the title [Bug] test tmp files aren't cleaned up when running /tests/functional/simple_seed [CT-1016] [Bug] test tmp files aren't cleaned up when running /tests/functional/simple_seed Aug 9, 2022
@jtcohen6 jtcohen6 added repo ci/cd Testing and continuous integration for dbt-core + adapter plugins tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality and removed bug Something isn't working triage labels Aug 10, 2022
@jtcohen6
Copy link
Contributor

Resolution: add a cleanup step to TestSeedSpecificFormats to remove the auto-generated 20k seed file at the end of the test. pytest should make this very easy.

return {
"big_seed.csv": big_seed,
"seed.with.dots.csv": dotted_seed,
"seed_unicode.csv": seed_unicode,
}

becomes

 yield { 
     "big_seed.csv": big_seed, 
     "seed.with.dots.csv": dotted_seed, 
     "seed_unicode.csv": seed_unicode, 
 } 
# now remove big_seed.csv

@iknox-fa
Copy link
Contributor Author

iknox-fa commented Dec 4, 2022

Resolved by #5749

@iknox-fa iknox-fa closed this as completed Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repo ci/cd Testing and continuous integration for dbt-core + adapter plugins tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality
Projects
None yet
Development

No branches or pull requests

2 participants