Skip to content
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

test(e2e): cover pulling test for image spec 1.1.0-rc.2 artifact #1098

Merged
merged 69 commits into from
Sep 1, 2023
Merged
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
f61b791
test(e2e): add zot
qweeah Aug 22, 2023
06abf60
add auth tests
qweeah Aug 22, 2023
8e644c6
uncomment changes
qweeah Aug 23, 2023
0c7a3ee
move auth and scenario suite to zot
qweeah Aug 23, 2023
35d8bd4
add password
qweeah Aug 23, 2023
1700e23
update description
qweeah Aug 23, 2023
7267ca4
separate prepare script out
qweeah Aug 23, 2023
a2cc4ea
check in zot config
qweeah Aug 23, 2023
e5f7398
add run access
qweeah Aug 23, 2023
2feed93
fix prepare bug
qweeah Aug 23, 2023
96fc889
remove prepare changes
qweeah Aug 24, 2023
2c2b597
run zot container via current user
qweeah Aug 25, 2023
6f9f3c2
rename zot
qweeah Aug 25, 2023
0a00292
add images repo for command suite and attach tests
qweeah Aug 25, 2023
3d60a75
update blob tests
qweeah Aug 25, 2023
c79ba60
Merge remote-tracking branch 'origin_src/main' into zot-attach
qweeah Aug 25, 2023
6e1998b
Merge remote-tracking branch 'origin_src/main' into zot-blob
qweeah Aug 28, 2023
d3d747b
Merge remote-tracking branch 'origin_src/main' into zot-attach
qweeah Aug 28, 2023
8efd185
add doc
qweeah Aug 28, 2023
f3cf89e
doc clean
qweeah Aug 28, 2023
8295d85
Merge branch 'zot-attach' into zot-blob
qweeah Aug 28, 2023
dea043d
fix e2e
qweeah Aug 28, 2023
1945b87
test(e2e): migrate `oras push` specs to ZOT
qweeah Aug 28, 2023
f028e61
fix e2e
qweeah Aug 28, 2023
a25d23f
fix e2e
qweeah Aug 29, 2023
003072a
Merge branch 'zot-push' into zot-pull
qweeah Aug 29, 2023
df78bef
test(e2e): migrate specs for `oras pull`
qweeah Aug 29, 2023
1e9bbd8
fix e2e
qweeah Aug 29, 2023
e2a4c38
Merge branch 'zot-push' into zot-pull
qweeah Aug 29, 2023
003c2c9
test(e2e): migrate `oras tag` specs to ZOT
qweeah Aug 29, 2023
e654e06
test(e2e): migrate `oras tag` specs to ZOT
qweeah Aug 29, 2023
d57f9bc
test(e2e): migrate `oras repo` specs to ZOT
qweeah Aug 29, 2023
0c7187c
remove focus
qweeah Aug 29, 2023
b42c474
Merge remote-tracking branch 'origin_src/main' into zot-blob
qweeah Aug 29, 2023
1f18415
test(e2e): migrate `oras repo` specs to ZOT
qweeah Aug 29, 2023
670ac47
Merge branch 'zot-blob' into zot-repo
qweeah Aug 29, 2023
cd370e3
test(e2e): migrate `oras manifest` specs to ZOT
qweeah Aug 29, 2023
313073d
move invalid pushing to fallback distribution
qweeah Aug 29, 2023
98be084
remove focus
qweeah Aug 29, 2023
69ef80d
Merge remote-tracking branch 'origin_src/main' into zot-manifest
qweeah Aug 30, 2023
d657c2f
test(e2e): migrate `oras cp` specs to ZOT
qweeah Aug 30, 2023
c6a290d
rebake test data for distribution
qweeah Aug 30, 2023
67d0556
add foobar referrers to ZOT
qweeah Aug 30, 2023
b6e10c5
update testdata constants
qweeah Aug 30, 2023
ba8de9a
update doc
qweeah Aug 31, 2023
095da7e
Merge branch 'zot-testdata' into zot-cp
qweeah Aug 31, 2023
a75205c
fix e2e
qweeah Aug 31, 2023
eded767
add test data
qweeah Aug 31, 2023
8d8745e
add linux amd64 referrers data
qweeah Aug 31, 2023
67d31de
test(e2e): migrate `oras discover` specs to ZOT
qweeah Aug 31, 2023
df7ec84
Merge branch 'zot-discover' into zot-cp
qweeah Aug 31, 2023
88e64fb
fix e2e
qweeah Aug 31, 2023
2150f68
Merge branch 'zot-discover' into zot-cp
qweeah Aug 31, 2023
0a981d8
add cp spec back
qweeah Aug 31, 2023
a49f6e9
add old artifact consumption test
qweeah Aug 31, 2023
b87864b
trigger building
qweeah Aug 31, 2023
bc06d38
add tests to cover rc2 artifacts
qweeah Aug 31, 2023
d75b7fd
Merge branch '1.1.0-e2e' into e2e-test
qweeah Aug 31, 2023
4b84e54
rebake test data
qweeah Aug 31, 2023
a90495d
rebake test data
qweeah Aug 31, 2023
ac755e5
Merge branch 'zot-testdata' into zot-cp
qweeah Sep 1, 2023
1eb658f
revert
qweeah Sep 1, 2023
9df1e0c
Merge branch 'zot-cp' into e2e-test
qweeah Sep 1, 2023
85e9955
Merge remote-tracking branch 'origin_src/main' into e2e-test
qweeah Sep 1, 2023
0dd5b3c
Merge remote-tracking branch 'origin_src/main' into zot-cp
qweeah Sep 1, 2023
8c9958d
Merge branch 'zot-cp' into e2e-1.1.0-rc2
qweeah Sep 1, 2023
5f9e9f8
Merge remote-tracking branch 'origin_src' into e2e-1.1.0-rc2
qweeah Sep 1, 2023
0544ed9
fix typo
qweeah Sep 1, 2023
d7303e1
Merge remote-tracking branch 'origin_src' into e2e-1.1.0-rc2
qweeah Sep 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions test/e2e/suite/command/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,43 @@ var _ = Describe("OCI image layout users:", func() {
})
})
})

var _ = Describe("OCI image spec v1.1.0-rc2 artifact users:", func() {
It("should pull all files in an image to a target folder", func() {
pullRoot := "pulled"
configName := "test.config"
tempDir := PrepareTempFiles()
stateKeys := append(foobar.ImageLayerStateKeys, foobar.ManifestStateKey, foobar.ImageConfigStateKey(configName))
ORAS("pull", RegistryRef(Host, ImageRepo, foobar.Tag), "-v", "--config", configName, "-o", pullRoot).
MatchStatus(stateKeys, true, len(stateKeys)).
WithWorkDir(tempDir).Exec()
// check config
configPath := filepath.Join(tempDir, pullRoot, configName)
Expect(configPath).Should(BeAnExistingFile())
f, err := os.Open(configPath)
Expect(err).ShouldNot(HaveOccurred())
defer f.Close()
Eventually(gbytes.BufferReader(f)).Should(gbytes.Say("{}"))
for _, f := range foobar.ImageLayerNames {
// check layers
Binary("diff", filepath.Join(tempDir, "foobar", f), filepath.Join(pullRoot, f)).
WithWorkDir(tempDir).Exec()
}

ORAS("pull", RegistryRef(Host, ImageRepo, foobar.Tag), "-v", "-o", pullRoot, "--keep-old-files").
ExpectFailure().
WithDescription("fail if overwrite old files are disabled")
})

It("should pull subject", func() {
tempDir := GinkgoT().TempDir()
stateKeys := append(append(
foobar.ImageLayerStateKeys,
foobar.ManifestStateKey),
foobar.ArtifactReferrerStateKeys...,
)
ORAS("pull", RegistryRef(Host, ArtifactRepo, foobar.SignatureArtifactReferrer.Digest.String()), "-v", "--include-subject").
MatchStatus(stateKeys, true, len(stateKeys)).
WithWorkDir(tempDir).Exec()
})
})