Skip to content

Commit

Permalink
add test for empty project
Browse files Browse the repository at this point in the history
  • Loading branch information
nchammas committed Feb 13, 2020
1 parent 5595267 commit dcd50a5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/integration/049_dbt_debug_test/test_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ def models(self):
def capsys(self, capsys):
self.capsys = capsys

@use_profile('postgres')
def test_postgres_empty_project(self):
with open('dbt_project.yml', 'w') as f:
pass
self.run_dbt(['debug', '--profile', 'test'])
splitout = self.capsys.readouterr().out.split('\n')
for line in splitout:
if line.strip().startswith('dbt_project.yml file'):
self.assertIn('ERROR invalid', line)
elif line.strip().startswith('profiles.yml file'):
self.assertNotIn('ERROR invalid', line)

@use_profile('postgres')
def test_postgres_badproject(self):
# load a special project that is an error
Expand Down

0 comments on commit dcd50a5

Please sign in to comment.