forked from containerbuildsystem/cachi2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
integration tests: Use single test repository
Modify each test module to use a branch (not a git commit) as a reference inside the new integration test repository that contains all integration (e2e) tests for cachi2. Update and improve a few functions inside utils.py Drop unnecessary lines from each Containerfile that were very often duplicated along with the comments. They were tightly coupled with our code printing output of specific files inside of directories coming from pytest. Remove unused "repo" test parameter. Rename "ref" test parameter to "branch". Closes containerbuildsystem#676 Signed-off-by: Michal Šoltis <[email protected]>
- Loading branch information
1 parent
f45b8b5
commit 4a6c0ad
Showing
31 changed files
with
284 additions
and
529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 2 additions & 8 deletions
10
tests/integration/test_data/gomod_1.18_e2e_test/container/Containerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
FROM docker.io/golang:1.18.1 AS build | ||
FROM docker.io/golang:1.18.1 | ||
|
||
# Test disabled network access | ||
RUN if curl -IsS www.google.com; then echo "Has network access!"; exit 1; fi | ||
|
||
# Print cachi2 env vars file | ||
RUN cat /tmp/cachi2.env | ||
|
||
# Check content of source repository folder | ||
RUN ls /tmp/gomod_1.18_e2e_test-source/ | ||
|
||
WORKDIR /tmp/gomod_1.18_e2e_test-source | ||
WORKDIR /src | ||
RUN . /tmp/cachi2.env && go build -o /usr/bin/retrodep | ||
|
||
CMD retrodep --help |
13 changes: 2 additions & 11 deletions
13
tests/integration/test_data/gomod_1.20_e2e_dirty_go.mod/container/Containerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 2 additions & 8 deletions
10
tests/integration/test_data/gomod_1.21_e2e_test/container/Containerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
FROM docker.io/golang:1.21.5 AS build | ||
FROM docker.io/golang:1.21.5 | ||
|
||
# Test disabled network access | ||
RUN if curl -IsS www.google.com; then echo "Has network access!"; exit 1; fi | ||
|
||
# Print cachi2 env vars file | ||
RUN cat /tmp/cachi2.env | ||
|
||
# Check content of source repository folder | ||
RUN ls /tmp/gomod_1.21_e2e_test-source/ | ||
|
||
WORKDIR /tmp/gomod_1.21_e2e_test-source | ||
WORKDIR /src | ||
RUN . /tmp/cachi2.env && go build -o /usr/bin/retrodep | ||
|
||
CMD retrodep --help |
10 changes: 2 additions & 8 deletions
10
tests/integration/test_data/gomod_1.22_e2e_workspace_vendoring/container/Containerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
FROM docker.io/golang:1.22.0 AS build | ||
FROM docker.io/golang:1.22.0 | ||
|
||
# Test disabled network access | ||
RUN if curl -IsS www.google.com; then echo "Has network access!"; exit 1; fi | ||
|
||
# Print cachi2 env vars file | ||
RUN cat /tmp/cachi2.env | ||
|
||
# Check content of source repository folder | ||
RUN ls /tmp/gomod_1.22_e2e_workspace_vendoring-source | ||
|
||
WORKDIR /tmp/gomod_1.22_e2e_workspace_vendoring-source/hi/hiii | ||
WORKDIR /src/hi/hiii | ||
RUN . /tmp/cachi2.env && go build -o /usr/bin/hiii | ||
|
||
CMD hiii |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.