Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Ct 866/migrate hook tests fixed (dbt-labs#5760)
Browse files Browse the repository at this point in the history
* Finish converting first test file.
* Finish test conversion.
* Remove old integration hook tests.
* Move location of schema.yml to models directory.
* fix snapshot delete test that was failing
* Add the extra env var check for our CI.
* Add changelog
* Remove naive json flag check and instead force all integration tests to check for environment variables using flag routine.
* Revise the changelog to be more of an explanation.

Co-authored-by: Mila Page <versusfacit@users.noreply.github.com>
  • Loading branch information
2 people authored and josephberni committed Sep 16, 2022
1 parent 9e1f6c0 commit 9f43219
Show file tree
Hide file tree
Showing 25 changed files with 912 additions and 831 deletions.
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220905-001749.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Migrate integration test 014 but also fix the snapshot hard delete test's timezone logic and force all integration tests to run flags.set_from_args to force environment variables are accessible to all integration test threads.
time: 2022-09-05T00:17:49.564534-07:00
custom:
Author: versusfacit
Issue: "5760"
PR: "5760"
1 change: 1 addition & 0 deletions core/dbt/events/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def setup_event_logger(log_path, level_override=None):
EVENT_HISTORY = deque(maxlen=flags.EVENT_BUFFER_SIZE) # type: ignore

make_log_dir_if_missing(log_path)

this.format_json = flags.LOG_FORMAT == "json"
# USE_COLORS can be None if the app just started and the cli flags
# havent been applied yet
Expand Down
63 changes: 0 additions & 63 deletions test/integration/014_hook_tests/configured-models/hooks.sql

This file was deleted.

91 changes: 0 additions & 91 deletions test/integration/014_hook_tests/error-models/hooks.sql

This file was deleted.

63 changes: 0 additions & 63 deletions test/integration/014_hook_tests/kwargs-models/hooks.sql

This file was deleted.

32 changes: 0 additions & 32 deletions test/integration/014_hook_tests/macros/before-and-after.sql

This file was deleted.

3 changes: 0 additions & 3 deletions test/integration/014_hook_tests/macros/hook.sql

This file was deleted.

2 changes: 0 additions & 2 deletions test/integration/014_hook_tests/models/hooks.sql

This file was deleted.

21 changes: 0 additions & 21 deletions test/integration/014_hook_tests/ref-hook-models/hooked.sql

This file was deleted.

1 change: 0 additions & 1 deletion test/integration/014_hook_tests/ref-hook-models/post.sql

This file was deleted.

1 change: 0 additions & 1 deletion test/integration/014_hook_tests/ref-hook-models/pre.sql

This file was deleted.

7 changes: 0 additions & 7 deletions test/integration/014_hook_tests/seed-models/schema.yml

This file was deleted.

4 changes: 0 additions & 4 deletions test/integration/014_hook_tests/seeds/example_seed.csv

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions test/integration/014_hook_tests/test-snapshots/snapshots.sql

This file was deleted.

Loading

0 comments on commit 9f43219

Please sign in to comment.