Skip to content

Commit 569e432

Browse files
committed
fixed container structure tests
1 parent 0e01923 commit 569e432

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ RUN apk add --no-cache \
4040
openssh-client=10.0_p1-r0 && \
4141
mkdir -p /middleware/output && \
4242
chown nonroot:nonroot /middleware/output
43+
WORKDIR /
4344
# Set the user to nonroot. It's defined in the Wolfi base image with the user id 65532
4445
# Copy the application from host
4546
COPY middleware/ /middleware/

test/container-structure-test/container-structure-test-config.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ metadataTest:
99
exposedPorts: []
1010
volumes: []
1111
entrypoint: [/entrypoint.sh]
12-
cmd: ["python", "main.py", "-c", "config.yml"]
13-
workdir: /middleware
12+
cmd: ["python", "-m", "middleware.main", "-c", "/middleware/config.yml"]
13+
workdir: /
1414
user: nonroot
1515

1616
fileExistenceTests:
@@ -23,9 +23,10 @@ commandTests:
2323
command: "python"
2424
args:
2525
[
26-
"main.py",
26+
"-m",
27+
"middleware.main",
2728
"-c",
28-
"test/container-structure-test/image_test_config.yml",
29+
"/middleware/test/container-structure-test/image_test_config.yml",
2930
"--no-git",
3031
]
3132
expectedOutput:

0 commit comments

Comments
 (0)