File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments