#!/usr/bin/env python import sys sys.path.append('.') import saltlint errors = saltlint.run('tests/states/soft_tabs.sls') def test_indent(): assert len(errors) == 2 def test_indent_error1(): assert errors[0][ 'message'] == 'Two space soft tabs not found - 4 space tab found' def test_indent_error2(): assert errors[1][ 'message'] == 'Two space soft tabs not found - 5 space tab found'
#!/usr/bin/env python import sys sys.path.append('.') import saltlint errors = saltlint.run('tests/states/nested_dict.sls') def test_indent(): assert len(errors) == 2 def test_indent_error1(): assert errors[0]['message'] == 'Four space soft tabs for nested dict not found - 2 space tab found' def test_indent_error2(): assert errors[1]['message'] == 'Four space soft tabs for nested dict not found - 2 space tab found'
#!/usr/bin/env python import sys sys.path.append('.') import saltlint errors = saltlint.run('tests/states/valid_state.sls') def test_valid_state(): assert len(errors) == 0
#!/usr/bin/env python import sys sys.path.append('.') import saltlint errors = saltlint.run('tests/states/trailing_whitespace.sls') def test_trailing_whitespace(): assert len(errors) == 1 def test_trailing_whitespace_error(): assert errors[0]['message'] == 'Trailing whitespace found'
#!/usr/bin/env python import sys sys.path.append('.') import saltlint errors = saltlint.run('tests/states/invalid_jinja.sls') def test_invalid_yaml(): assert len(errors) == 1
#!/usr/bin/env python import sys sys.path.append('.') import saltlint errors = saltlint.run('tests/states/dataset.sls') def test_indent(): assert len(errors) == 0
#!/usr/bin/env python import sys sys.path.append('.') import saltlint errors = saltlint.run('tests/states/soft_tabs.sls') def test_indent(): assert len(errors) == 2 def test_indent_error1(): assert errors[0]['message'] == 'Two space soft tabs not found - 4 space tab found' def test_indent_error2(): assert errors[1]['message'] == 'Two space soft tabs not found - 5 space tab found'
#!/usr/bin/env python import sys sys.path.append(".") import saltlint errors = saltlint.run("tests/states/include.sls") def test_include(): assert len(errors) == 0
#!/usr/bin/env python import sys sys.path.append('.') import saltlint errors = saltlint.run('tests/states/tab_characters.sls') def test_tabs(): assert len(errors) == 1 def test_tabs_error(): assert errors[0]['message'] == 'Tab character(s) found'
#!/usr/bin/env python import sys sys.path.append('.') import saltlint errors = saltlint.run('tests/states/include.sls') def test_include(): assert len(errors) == 0
#!/usr/bin/env python import sys sys.path.append('.') import saltlint errors = saltlint.run('tests/states/invalid_yaml.sls') def test_invalid_yaml(): assert len(errors) == 1
#!/usr/bin/env python import sys sys.path.append(".") import saltlint errors = saltlint.run("tests/states/valid_state.sls") def test_valid_state(): assert len(errors) == 0
#!/usr/bin/env python import sys sys.path.append('.') import saltlint errors = saltlint.run('tests/states/valid_jinja_state.sls') def test_valid_state(): assert len(errors) == 0