From c0fb05584e5f79235cb494278c309e47aa3fc40f Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 11 Jan 2016 09:53:52 -0800 Subject: [PATCH] fixing incorrect comments Signed-off-by: David Lawrence (github: endophage) --- certs/certs_test.go | 6 +++--- client/client.go | 1 - client/client_test.go | 10 ++++------ cmd/notary/cert.go | 4 ++-- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/certs/certs_test.go b/certs/certs_test.go index 5cb70f6772..dfa8998b77 100644 --- a/certs/certs_test.go +++ b/certs/certs_test.go @@ -123,7 +123,7 @@ func TestValidateRoot(t *testing.T) { defer os.RemoveAll(tempBaseDir) assert.NoError(t, err, "failed to create a temporary directory: %s", err) - // Create a Manager + // Create a X509Store trustPath := filepath.Join(tempBaseDir, notary.TrustedCertsDir) certStore, err := trustmanager.NewX509FilteredFileStore( trustPath, @@ -223,8 +223,8 @@ func TestValidateSuccessfulRootRotation(t *testing.T) { } } -// Generates a Manager in a temporary directory and returns the -// manager and certificates for two keys which have been added to the keystore. +// Generates a X509Store in a temporary directory and returns the +// store and certificates for two keys which have been added to the keystore. // Also returns the temporary directory so it can be cleaned up. func filestoreWithTwoCerts(t *testing.T, gun, keyAlg string) ( string, trustmanager.X509Store, *cryptoservice.CryptoService, []*x509.Certificate) { diff --git a/client/client.go b/client/client.go index 6382b0d5b0..1557924888 100644 --- a/client/client.go +++ b/client/client.go @@ -13,7 +13,6 @@ import ( "time" "github.com/Sirupsen/logrus" - "github.com/jfrazelle/go/canonical/json" "github.com/docker/notary" "github.com/docker/notary/certs" diff --git a/client/client_test.go b/client/client_test.go index 6cc8bd7202..7f384efd4c 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -20,6 +20,7 @@ import ( "github.com/Sirupsen/logrus" ctxu "github.com/docker/distribution/context" "github.com/jfrazelle/go/canonical/json" + "github.com/stretchr/testify/assert" "golang.org/x/net/context" "github.com/docker/notary" @@ -33,9 +34,6 @@ import ( "github.com/docker/notary/tuf/signed" "github.com/docker/notary/tuf/store" "github.com/docker/notary/tuf/validation" - "github.com/jfrazelle/go/canonical/json" - "github.com/stretchr/testify/assert" - "golang.org/x/net/context" ) const password = "passphrase" @@ -425,11 +423,11 @@ func assertRepoHasExpectedKeys(t *testing.T, repo *NotaryRepository, "there should be no timestamp key because the server manages it") } -// This creates a new certificate manager in the repo's base directory and +// This creates a new certificate store in the repo's base directory and // makes sure the repo has the right certificates func assertRepoHasExpectedCerts(t *testing.T, repo *NotaryRepository) { - // The repo should have a certificate manager and have created certs using - // it, so create a new manager, and check that the certs do exist and + // The repo should have a certificate store and have created certs using + // it, so create a new store, and check that the certs do exist and // are valid trustPath := filepath.Join(repo.baseDir, notary.TrustedCertsDir) certStore, err := trustmanager.NewX509FilteredFileStore( diff --git a/cmd/notary/cert.go b/cmd/notary/cert.go index e4a8a3aba8..3fd351ffac 100644 --- a/cmd/notary/cert.go +++ b/cmd/notary/cert.go @@ -59,7 +59,7 @@ func certRemove(cmd *cobra.Command, args []string) { trustmanager.FilterCertsExpiredSha1, ) if err != nil { - fatalf("Failed to create a new truststore manager with directory: %s", trustDir) + fatalf("Failed to create a new truststore with directory: %s", trustDir) } var certsToRemove []*x509.Certificate @@ -129,7 +129,7 @@ func certList(cmd *cobra.Command, args []string) { trustmanager.FilterCertsExpiredSha1, ) if err != nil { - fatalf("Failed to create a new truststore manager with directory: %s", trustDir) + fatalf("Failed to create a new truststore with directory: %s", trustDir) } trustedCerts := certStore.GetCertificates()