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 Dec 3, 2024
1 parent e9dda1b commit cb6f6c0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/revocation/revocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"github.com/notaryproject/notation-core-go/revocation/purpose"
"github.com/notaryproject/notation-go/dir"
"github.com/notaryproject/notation-go/verifier/crl"
clicrl "github.com/notaryproject/notation/internal/crl"
"github.com/notaryproject/notation/internal/httputil"
clicrl "github.com/notaryproject/notation/internal/revocation/crl"
)

// NewRevocationValidator returns a revocation.Validator given the certificate
Expand Down
16 changes: 16 additions & 0 deletions internal/revocation/revocation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ package revocation

import (
"context"
"net/http"
"os"
"runtime"
"testing"
"time"

corecrl "github.com/notaryproject/notation-core-go/revocation/crl"
"github.com/notaryproject/notation-core-go/revocation/purpose"
"github.com/notaryproject/notation-go/dir"
"github.com/notaryproject/notation/internal/httputil"
)

func TestNewRevocationValidator(t *testing.T) {
Expand Down Expand Up @@ -57,3 +61,15 @@ func TestNewRevocationValidator(t *testing.T) {
}
})
}

func TestNilError(t *testing.T) {
_, err := corecrl.NewHTTPFetcher(httputil.NewClient(context.Background(), &http.Client{Timeout: 5 * time.Second}))
if err != nil {
t.Fatal(err)
}

_, err = dir.CacheFS().SysPath(dir.PathCRLCache)
if err != nil {
t.Fatal(err)
}
}

0 comments on commit cb6f6c0

Please sign in to comment.