Skip to content

Commit

Permalink
Fix windows
Browse files Browse the repository at this point in the history
Signed-off-by: Natalie Arellano <narellano@vmware.com>
  • Loading branch information
natalieparellano committed Sep 28, 2022
1 parent 70ab2c8 commit 3fd7bbb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/selective/write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,20 @@ func testSelective(t *testing.T, when spec.G, it spec.S) {

it.Before(func() {
testImageName := "busybox"
var opts []remote.Option
if runtime.GOOS == "windows" {
testImageName = "mcr.microsoft.com/windows/nanoserver:1809"
windowsPlatform := v1.Platform{
OS: "windows",
}
opts = append(opts, remote.WithPlatform(windowsPlatform))
}

ref, authr, err := auth.ReferenceForRepoName(authn.DefaultKeychain, testImageName)
h.AssertNil(t, err)
testImage, err = remote.Image(ref, remote.WithAuth(authr))
opts = append(opts, remote.WithAuth(authr))

testImage, err = remote.Image(ref, opts...)
h.AssertNil(t, err)

tmpDir, err = ioutil.TempDir("", "")
Expand Down

0 comments on commit 3fd7bbb

Please sign in to comment.