Skip to content

Commit

Permalink
simpler integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
mschneider82 committed Apr 22, 2024
1 parent aa9dbab commit 84c80d4
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions integration/dockerfiles/Dockerfile_test_copyadd_chmod
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
FROM alpine@sha256:5ce5f501c457015c4b91f91a15ac69157d9b06f1a75cf9107bf2b62e0843983a
ADD --chmod=0666 context/foo /path/file666
ADD --chmod=777 context/qux /path/dir777

ADD --chmod=0666 context/foo /file666
ADD --chmod=777 context/qux /dir777

# ADD tests
RUN test "$(stat -c "%a" /path/file666)" = "666"
# simple file
RUN test "$(stat -c "%a" /file666)" = "666"

RUN test "$(stat -c "%a" /path/dir777/qup)" = "777"
RUN test "$(stat -c "%a" /path/dir777/quw)" = "777"
RUN test "$(stat -c "%a" /path/dir777/quw/que)" = "777"
# recurive dir
RUN test "$(stat -c "%a" /dir777/qup)" = "777"
RUN test "$(stat -c "%a" /dir777/quw/que)" = "777"

# COPY tests

COPY --chmod=0755 context/foo /path/copyfile755
COPY --chmod=755 context/qux /path/copydir755
COPY --chmod=0755 context/foo /copyfile755
COPY --chmod=755 context/qux /copydir755

RUN test "$(stat -c "%a" /path/copyfile755)" = "755"
RUN test "$(stat -c "%a" /copyfile755)" = "755"

RUN test "$(stat -c "%a" /path/copydir755/qup)" = "755"
RUN test "$(stat -c "%a" /path/copydir755/quw)" = "755"
RUN test "$(stat -c "%a" /path/copydir755/quw/que)" = "755"
RUN test "$(stat -c "%a" /copydir755/qup)" = "755"
RUN test "$(stat -c "%a" /copydir755/quw/que)" = "755"

0 comments on commit 84c80d4

Please sign in to comment.