Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Zheng <patrickzheng@microsoft.com>
  • Loading branch information
Two-Hearts committed Jan 10, 2025
1 parent 5318f7d commit 26e6982
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/e2e/suite/command/blob/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

const tsaURL = "http://timestamp.digicert.com"

var _ = Describe("notation blob sign", Serial, func() {
var _ = Describe("notation blob sign", func() {
// Success cases
It("with blob sign", func() {
HostWithBlob(BaseOptions(), func(notation *utils.ExecOpts, blobPath string, vhost *utils.VirtualHost) {
Expand Down Expand Up @@ -76,7 +76,7 @@ var _ = Describe("notation blob sign", Serial, func() {
HostWithBlob(BaseOptions(), func(notation *utils.ExecOpts, blobPath string, vhost *utils.VirtualHost) {
notation.Exec("blob", "sign", "--force", "--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", filepath.Join(vhost.AbsolutePath("blobFile.jws.sig"))))
})
})

Expand Down Expand Up @@ -127,7 +127,7 @@ var _ = Describe("notation blob sign", Serial, 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 := filepath.Join(vhost.AbsolutePath("noPermissionBlob"))
newBlobFile, err := os.Create(noPermissionBlobPath)
if err != nil {
Fail(err.Error())
Expand All @@ -146,7 +146,7 @@ var _ = Describe("notation blob sign", Serial, 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 := filepath.Join(vhost.AbsolutePath("signature"))
if err := os.MkdirAll(sigDir, 0000); err != nil {
Fail(err.Error())
}
Expand Down

0 comments on commit 26e6982

Please sign in to comment.