Commit 2583f04
authored
tests: Build the layering test images on scratch to avoid pulling swift:slim (#60)
Motivation
----------
The layering tests sometimes fail with 400 errors from the registry.
This error could be caused by pulling the underlying base image from
Docker Hub, although the logs do not give enough information to be
certain.
We don't need to run the container image in order to check that the
payload file is being layered correctly. This would avoid the need to
pull `swift:slim`, reducing the risk of external systems causing test
failures.
Modifications
-------------
Build the test image on scratch.
Instead of running the container and using `cat` to check the contents
of `/payload`, create a container from the image and copy `/payload`
out, without starting the container.
Result
------
The layering tests should be less susceptible to failures caused by
external systems.
Test Plan
---------
All tests continue to pass.1 parent 89f49be commit 2583f04
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | | - | |
| 41 | + | |
40 | 42 | | |
41 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
0 commit comments