Skip to content

Commit 6bd426d

Browse files
committed
add ephemeral error handling test
1 parent 874ea3f commit 6bd426d

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import pytest
2+
from dbt.tests.adapter.ephemeral.test_ephemeral import (
3+
BaseEphemeral,
4+
ephemeral_errors__base__base_copy_sql,
5+
ephemeral_errors__base__base_sql,
6+
ephemeral_errors__dependent_sql,
7+
)
8+
from dbt.tests.util import run_dbt
9+
10+
11+
class TestEphemeralErrorHandling(BaseEphemeral):
12+
@pytest.fixture(scope="class")
13+
def models(self):
14+
return {
15+
"dependent.sql": ephemeral_errors__dependent_sql,
16+
"base": {
17+
"base.sql": ephemeral_errors__base__base_sql,
18+
"base_copy.sql": ephemeral_errors__base__base_copy_sql,
19+
},
20+
}
21+
22+
def test_ephemeral_error_handling(self, project):
23+
results = run_dbt(["run"], expect_pass=False)
24+
assert len(results) == 1
25+
assert results[0].status == "skipped"
26+
assert "Compilation Error" in results[0].message

0 commit comments

Comments
 (0)