|
| 1 | +from dbt.tests.util import ( |
| 2 | + run_dbt, |
| 3 | + check_relations_equal, |
| 4 | + rm_file, |
| 5 | + write_file |
| 6 | + ) |
| 7 | +from dbt.tests.adapter.concurrency.test_concurrency import ( |
| 8 | + BaseConcurrency, |
| 9 | + seeds__update_csv |
| 10 | + ) |
| 11 | + |
| 12 | + |
| 13 | +class TestConncurenncySqlite(BaseConcurrency): |
| 14 | + |
| 15 | + def test_conncurrency_sqlite(self, project): |
| 16 | + run_dbt(["seed", "--select", "seed"]) |
| 17 | + results = run_dbt(["run"], expect_pass=False) |
| 18 | + assert len(results) == 7 |
| 19 | + check_relations_equal(project.adapter, ["SEED", "VIEW_MODEL"]) |
| 20 | + check_relations_equal(project.adapter, ["SEED", "DEP"]) |
| 21 | + check_relations_equal(project.adapter, ["SEED", "TABLE_A"]) |
| 22 | + check_relations_equal(project.adapter, ["SEED", "TABLE_B"]) |
| 23 | + |
| 24 | + rm_file(project.project_root, "seeds", "seed.csv") |
| 25 | + write_file(seeds__update_csv, project.project_root + '/seeds', "seed.csv") |
| 26 | + results = run_dbt(["run"], expect_pass=False) |
| 27 | + assert len(results) == 7 |
| 28 | + check_relations_equal(project.adapter, ["SEED", "VIEW_MODEL"]) |
| 29 | + check_relations_equal(project.adapter, ["SEED", "DEP"]) |
| 30 | + check_relations_equal(project.adapter, ["SEED", "TABLE_A"]) |
| 31 | + check_relations_equal(project.adapter, ["SEED", "TABLE_B"]) |
0 commit comments