diff --git a/internal/crl/crl.go b/internal/revocation/crl/crl.go similarity index 100% rename from internal/crl/crl.go rename to internal/revocation/crl/crl.go diff --git a/internal/crl/crl_test.go b/internal/revocation/crl/crl_test.go similarity index 100% rename from internal/crl/crl_test.go rename to internal/revocation/crl/crl_test.go diff --git a/internal/revocation/revocation.go b/internal/revocation/revocation.go index b5688d201..412d6f0e5 100644 --- a/internal/revocation/revocation.go +++ b/internal/revocation/revocation.go @@ -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 diff --git a/internal/revocation/revocation_test.go b/internal/revocation/revocation_test.go index 7c1aedd9e..eeb7ff54b 100644 --- a/internal/revocation/revocation_test.go +++ b/internal/revocation/revocation_test.go @@ -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) { @@ -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) + } +}