Skip to content

Commit

Permalink
Update push_test.go
Browse files Browse the repository at this point in the history
Signed-off-by: yzewei <[email protected]>
  • Loading branch information
yzewei authored Jan 17, 2024
1 parent 388b67a commit 31b8e16
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cmd/registry/push/push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ var registryPushTests = Describe("push", func() {
// Plugin's platforms.
platformARM64 = "linux/arm64"
platformAMD64 = "linux/amd64"
platformLOONG64 = "linux/loong64"

// Data fetched from registry and used for assertions.
pluginData *testutils.PluginArtifact
Expand Down Expand Up @@ -480,7 +479,7 @@ var registryPushTests = Describe("push", func() {
Expect(output).Should(gbytes.Say(regexp.QuoteMeta(pluginData.Descriptor.Digest.String())))

By("checking index")
Expect(pluginData.Index.Manifests).Should(HaveLen(3))
Expect(pluginData.Index.Manifests).Should(HaveLen(2))

if annotation {
Expect(pluginData.Index.Annotations).Should(HaveKeyWithValue("org.opencontainers.image.source", anSource))
Expand All @@ -491,7 +490,6 @@ var registryPushTests = Describe("push", func() {
By("checking platforms")
Expect(pluginData.Platforms).Should(HaveKey(platformARM64))
Expect(pluginData.Platforms).Should(HaveKey(platformAMD64))
Expect(pluginData.Platforms).Should(HaveKey(platformLOONG64))

By("checking config layer")
for _, p := range pluginData.Platforms {
Expand Down Expand Up @@ -541,8 +539,7 @@ var registryPushTests = Describe("push", func() {
When("with full flags and args", func() {
BeforeEach(func() {
args = []string{registryCmd, pushCmd, fullRepoName, plugin, pluginRaw, "--type", "plugin", "--platform",
platformAMD64, "--platform",
platformARM64, "--platform", platformLOONG64, "--version", version, "--config", configFile,
platformAMD64, "--platform", platformARM64, "--version", version, "--config", configFile,
"--plain-http", "--depends-on", dep1, "--depends-on", dep2, "--requires", req, "--annotation-source", anSource,
"--tag", pushedTags[0], "--tag", pushedTags[1], "--tag", pushedTags[2], "--name", artifactNameInConfigLayer}
})
Expand Down

0 comments on commit 31b8e16

Please sign in to comment.