Completed
Pull Request — master (#1431)
by Abdeali
01:38
created

bears.tests.configfiles.DockerfileLintBearTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %
Metric Value
dl 0
loc 16
rs 10
wmc 2
1
from bears.configfiles.DockerfileLintBear import DockerfileLintBear
2
from bears.tests.LocalBearTestHelper import verify_local_bear
3
4
5
good_file = """
6
FROM ubuntu:14.04
7
8
# Install basic tools
9
RUN apt-get -y -qq update
10
RUN apt-get -y -qq upgrade
11
""".split("\n")
12
13
14
bad_file = """
15
FROM ubuntu:14.04
16
17
# Install basic tools
18
apt-get -y -qq update
19
apt-get -y -qq upgrade
20
""".split("\n")
21
22
23
DockerfileLintBear1Test = verify_local_bear(DockerfileLintBear,
24
                                            valid_files=(good_file,),
25
                                            invalid_files=(bad_file,))
26