-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests: frontend/dockerfile: update integration tests for windows/wcow #5382
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than those comments, the rest LGTM.
May be just update your commit message too to match the PR, with the subject:
tests: frontend/dockerfile: update integration tests for windows/wcow
d8a972d
to
4c751c4
Compare
47e451c
to
7a25fb0
Compare
- [x] `testCopyThroughSymlinkContext` - [x] `testIgnoreEntrypoint` - [x] `testQuotedMetaArgs` - [x] `testDockerfileCheckHostname` - [x] `testEmptyStages` - [x] `testNamedImageContextScratch` - [x] `testNamedImageContextPlatform` Signed-off-by: Daniel Githinji <danskigee@gmail.com>
7a25fb0
to
ccdd43b
Compare
`, | ||
` | ||
FROM nanoserver | ||
RUN reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" /v Hostname| findstr "foo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we will need to check if this command actually returned something or failed and exit appropriately,
f := getFrontend(t, sb) | ||
dockerfile := []byte(` | ||
dockerfile := []byte(integration.UnixOrWindows( | ||
` | ||
ARG foo=bar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ARG foo=bar
is same for both linux and windows no need to use .UnixOrWindows
@@ -6708,7 +6743,14 @@ func testNamedImageContextPlatform(t *testing.T, sb integration.Sandbox) { | |||
require.NoError(t, err) | |||
|
|||
// Build a base image and force buildkit to generate a manifest list. | |||
dockerfile := []byte(`FROM --platform=$BUILDPLATFORM alpine:latest`) | |||
dockerfile := []byte(integration.UnixOrWindows( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lin 6746 to 6753 can be collapsed to
baseImage := integration.UnixOrWindows(
"alpine",
"nanoserver",
)
dockerfile := []byte(fmt.Sprintf(`FROM --platform=$BUILDPLATFORM %s:latest`, baseImage))
Updated tests in frontend/dockerfile/dockerfile_test.go to run on Windows.
Partially addressing #4485
testCopyThroughSymlinkContext
testIgnoreEntrypoint
testQuotedMetaArgs
testDockerfileCheckHostname
testEmptyStages
testNamedImageContextScratch
testNamedImageContextPlatform