mirror of https://github.com/docker/docs.git
fixing incorrect comments
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
parent
9e80ad8158
commit
c0fb05584e
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue