-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #439 add additional tests for quotes
Add additional tests to ensure that ARG values with quotes are handled properly
- Loading branch information
Showing
9 changed files
with
217 additions
and
10 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
integration/dockerfiles/Dockerfile_test_arg_blank_with_quotes
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
ARG FILE_NAME="" | ||
|
||
FROM busybox:latest AS builder | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
|
||
FROM busybox:latest | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
COPY --from=builder /$FILE_NAME.txt / |
13 changes: 13 additions & 0 deletions
13
integration/dockerfiles/Dockerfile_test_arg_from_missing_first_quote
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG FILE_NAME="myFile" | ||
ARG IMAGE_NAME=busybox:latest" | ||
|
||
FROM $IMAGE_NAME AS builder | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
|
||
FROM busybox:latest | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
COPY --from=builder /$FILE_NAME.txt / |
13 changes: 13 additions & 0 deletions
13
integration/dockerfiles/Dockerfile_test_arg_from_missing_last_quote
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG FILE_NAME="myFile" | ||
ARG IMAGE_NAME="busybox:latest | ||
|
||
FROM $IMAGE_NAME AS builder | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
|
||
FROM busybox:latest | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
COPY --from=builder /$FILE_NAME.txt / |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG FILE_NAME="myFile" | ||
ARG IMAGE_NAME="busybox:latest" | ||
|
||
FROM $IMAGE_NAME AS builder | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
|
||
FROM busybox:latest | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
COPY --from=builder /$FILE_NAME.txt / |
13 changes: 13 additions & 0 deletions
13
integration/dockerfiles/Dockerfile_test_arg_from_quotes_escaped
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG FILE_NAME="myFile" | ||
ARG IMAGE_NAME=\"busybox:latest\" | ||
|
||
FROM $IMAGE_NAME AS builder | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
|
||
FROM busybox:latest | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
COPY --from=builder /$FILE_NAME.txt / |
13 changes: 13 additions & 0 deletions
13
integration/dockerfiles/Dockerfile_test_arg_from_single_quotes
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG FILE_NAME="myFile" | ||
ARG IMAGE_NAME='busybox:latest' | ||
|
||
FROM $IMAGE_NAME AS builder | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
|
||
FROM busybox:latest | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
COPY --from=builder /$FILE_NAME.txt / |
13 changes: 13 additions & 0 deletions
13
integration/dockerfiles/Dockerfile_test_arg_from_single_quotes_escaped
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
ARG FILE_NAME="myFile" | ||
ARG IMAGE_NAME=\'busybox:latest\' | ||
|
||
FROM $IMAGE_NAME AS builder | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
|
||
FROM busybox:latest | ||
ARG FILE_NAME | ||
|
||
RUN echo $FILE_NAME && touch /$FILE_NAME.txt && stat /$FILE_NAME.txt; | ||
COPY --from=builder /$FILE_NAME.txt / |
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