|
3 | 3 |
|
4 | 4 |
|
5 | 5 | class TestBuild(BaseTest):
|
6 |
| - """Test building the image |
7 |
| - """ |
| 6 | + """Test building the image""" |
8 | 7 |
|
9 | 8 | def test_build_default(self):
|
10 |
| - """Test building the image with default parameters, then running the container, thus running the app |
11 |
| - """ |
| 9 | + """Test building the image with default parameters, then running the container, thus running the app""" |
12 | 10 | image, output = self.build_image()
|
13 | 11 | assert image in output
|
14 | 12 |
|
15 | 13 | output = self.run_container(image=image)
|
16 | 14 | assert OUTPUT_SUCCESS in output
|
17 | 15 |
|
18 | 16 | def test_build_username(self):
|
19 |
| - """Test building the image changing the username |
20 |
| - """ |
| 17 | + """Test building the image changing the username""" |
21 | 18 | image, output = self.build_image(user=USERNAME)
|
22 | 19 | assert image in output
|
23 | 20 |
|
24 |
| - output = self.run_container(image=image, final_args=["pwd"]) |
| 21 | + output = self.run_container(image=image, args=["--entrypoint", "pwd"]) |
25 | 22 | assert "/home/{}".format(USERNAME) in output
|
26 | 23 |
|
27 | 24 | def test_build_from_alpine(self):
|
28 |
| - """Test building the image using the 'python:alpine' base image |
29 |
| - """ |
| 25 | + """Test building the image using the 'python:alpine' base image""" |
30 | 26 | image, output = self.build_image(from_image="python:alpine")
|
31 | 27 | assert image in output
|
32 | 28 |
|
33 | 29 | output = self.run_container(image=image, args=["--entrypoint", "which"], final_args=["apk"])
|
34 | 30 | assert "/sbin/apk" in output
|
35 | 31 |
|
36 |
| - def test_build_from_python27(self): |
37 |
| - """Test building the image using the 'python:2.7-alpine' base image |
38 |
| - """ |
39 |
| - image, output = self.build_image(from_image="python:2.7-alpine") |
40 |
| - assert image in output |
41 |
| - |
42 |
| - output = self.run_container(image=image, final_args=["python", "-V"]) |
43 |
| - assert output.startswith("Python 2.7") |
44 |
| - |
45 | 32 | def test_build_from_pyston(self):
|
46 |
| - """Test building the image using the 'pyston/pyston' base image |
47 |
| - """ |
| 33 | + """Test building the image using the 'pyston/pyston' base image""" |
48 | 34 | image, output = self.build_image(from_image="pyston/pyston")
|
49 | 35 | assert image in output
|
50 | 36 |
|
51 |
| - output = self.run_container(image=image, final_args=["python", "-V"]) |
| 37 | + output = self.run_container(image=image, args=["--entrypoint", "python"], final_args=["-V"]) |
52 | 38 | assert "[Pyston " in output
|
53 | 39 |
|
54 | 40 | def test_build_from_pypy(self):
|
55 |
| - """Test building the image using the 'pypy' base image |
56 |
| - """ |
| 41 | + """Test building the image using the 'pypy' base image""" |
57 | 42 | image, output = self.build_image(from_image="pypy")
|
58 | 43 | assert image in output
|
59 | 44 |
|
60 |
| - output = self.run_container(image=image, final_args=["python", "-V"]) |
| 45 | + output = self.run_container(image=image, args=["--entrypoint", "python"], final_args=["-V"]) |
61 | 46 | assert "[PyPy " in output
|
0 commit comments