File: TestDependenciesInMeta.py

package info (click to toggle)
ansible-lint 4.1.0%2Bdfsg.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,096 kB
  • sloc: python: 3,373; sh: 4; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 1,326 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
import unittest

from ansiblelint import Runner, RulesCollection


class TestDependenciesInMeta(unittest.TestCase):

    def setUp(self):
        rulesdir = os.path.join('lib', 'ansiblelint', 'rules')
        self.rules = RulesCollection.create_from_directory(rulesdir)

    def test_bitbucket_in_meta_dependency_is_ok(self):
        filename = 'test/dependency-in-meta/bitbucket.yml'
        self.assertEqual([], Runner(self.rules, filename, [], [], []).run())

    def test_galaxy_dependency_is_ok(self):
        filename = 'test/dependency-in-meta/galaxy.yml'
        good_runner = Runner(self.rules, filename, [], [], [])
        self.assertEqual([], good_runner.run())

    def test_github_dependency_is_ok(self):
        filename = 'test/dependency-in-meta/github.yml'
        good_runner = Runner(self.rules, filename, [], [], [])
        self.assertEqual([], good_runner.run())

    def test_webserver_dependency_is_ok(self):
        filename = 'test/dependency-in-meta/webserver.yml'
        good_runner = Runner(self.rules, filename, [], [], [])
        self.assertEqual([], good_runner.run())

    def test_gitlab_dependency_is_ok(self):
        filename = 'test/dependency-in-meta/gitlab.yml'
        good_runner = Runner(self.rules, filename, [], [], [])
        self.assertEqual([], good_runner.run())