Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Zheng <[email protected]>
  • Loading branch information
Two-Hearts committed Jan 10, 2025
1 parent a86854f commit d7e881c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/e2e/suite/command/blob/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ var _ = Describe("notation blob sign", func() {
HostWithBlob(BaseOptions(), func(notation *utils.ExecOpts, blobPath string, vhost *utils.VirtualHost) {
notation.Exec("blob", "sign", "--signature-directory", vhost.AbsolutePath(), blobPath).
MatchKeyWords(SignSuccessfully).
MatchKeyWords(fmt.Sprintf("Signature file written to %s", filepath.Join(vhost.AbsolutePath("blobFile.jws.sig"))))
MatchKeyWords(fmt.Sprintf("Signature file written to %s", vhost.AbsolutePath("blobFile.jws.sig")))
})
})

Expand All @@ -101,11 +101,11 @@ var _ = Describe("notation blob sign", func() {
sigDir := vhost.AbsolutePath()
notation.Exec("blob", "sign", "--signature-directory", sigDir, blobPath).
MatchKeyWords(SignSuccessfully).
MatchKeyWords(fmt.Sprintf("Signature file written to %s", filepath.Join(vhost.AbsolutePath("blobFile.jws.sig"))))
MatchKeyWords(fmt.Sprintf("Signature file written to %s", vhost.AbsolutePath("blobFile.jws.sig")))

notation.Exec("blob", "sign", "--force", "--signature-directory", sigDir, blobPath).
MatchKeyWords(SignSuccessfully).
MatchKeyWords(fmt.Sprintf("Signature file written to %s", filepath.Join(vhost.AbsolutePath("blobFile.jws.sig"))))
MatchKeyWords(fmt.Sprintf("Signature file written to %s", vhost.AbsolutePath("blobFile.jws.sig")))
})
})

Expand Down Expand Up @@ -140,7 +140,7 @@ var _ = Describe("notation blob sign", func() {

It("with no permission to read the blob file", func() {
HostWithBlob(BaseOptions(), func(notation *utils.ExecOpts, blobPath string, vhost *utils.VirtualHost) {
noPermissionBlobPath := filepath.Join(vhost.AbsolutePath("noPermissionBlob"))
noPermissionBlobPath := vhost.AbsolutePath("noPermissionBlob")
newBlobFile, err := os.Create(noPermissionBlobPath)
if err != nil {
Fail(err.Error())
Expand All @@ -159,7 +159,7 @@ var _ = Describe("notation blob sign", func() {

It("with no permission to write the signature file", func() {
HostWithBlob(BaseOptions(), func(notation *utils.ExecOpts, blobPath string, vhost *utils.VirtualHost) {
sigDir := filepath.Join(vhost.AbsolutePath("signature"))
sigDir := vhost.AbsolutePath("signature")
if err := os.MkdirAll(sigDir, 0000); err != nil {
Fail(err.Error())
}
Expand Down

0 comments on commit d7e881c

Please sign in to comment.