Skip to content

Commit

Permalink
Ineffassign fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Riyaz Faizullabhoy <[email protected]>
  • Loading branch information
riyazdf committed Sep 10, 2016
1 parent 25086b9 commit 5be0a47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions cmd/notary/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2155,7 +2155,6 @@ func TestClientKeyImport(t *testing.T) {
require.NoError(t, err)
tempFile4.Close()
require.Equal(t, len(pemBytes), nBytes)
newKeyID := privKey.ID()

// import the key
_, err = runCommand(t, tempDir, "key", "import", tempFile4.Name(), "-r", "somerole", "-g", "somegun")
Expand Down Expand Up @@ -2187,7 +2186,6 @@ func TestClientKeyImport(t *testing.T) {
require.NoError(t, err)
tempFile5.Close()
require.Equal(t, len(pemBytes), nBytes)
newKeyID = privKey.ID()

// import the key
_, err = runCommand(t, tempDir, "key", "import", tempFile5.Name(), "-r", data.CanonicalSnapshotRole, "-g", "somegun")
Expand Down Expand Up @@ -2245,7 +2243,6 @@ func TestClientKeyImport(t *testing.T) {
require.NoError(t, err)
tempFile7.Close()
require.Equal(t, len(pemBytes), nBytes)
newKeyID = privKey.ID()

// import the key
_, err = runCommand(t, tempDir, "key", "import", tempFile7.Name(), "-r", "somerole")
Expand Down Expand Up @@ -2276,7 +2273,7 @@ func TestClientKeyImport(t *testing.T) {
require.NoError(t, err)
tempFile8.Close()
require.Equal(t, len(pemBytes), nBytes)
newKeyID = privKey.ID()
newKeyID := privKey.ID()

// import the key
_, err = runCommand(t, tempDir, "key", "import", tempFile8.Name())
Expand Down
2 changes: 2 additions & 0 deletions cmd/notary/keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ func TestExportKeys(t *testing.T) {
require.NoError(t, err)

fileStore, err := store.NewPrivateKeyFileStorage(tempBaseDir, notary.KeyExtension)
require.NoError(t, err)
err = fileStore.Set("ankh", bBytes)
require.NoError(t, err)
err = fileStore.Set("morpork", cBytes)
Expand Down Expand Up @@ -736,6 +737,7 @@ func TestExportKeysByID(t *testing.T) {
cBytes := pem.EncodeToMemory(c)

fileStore, err := store.NewPrivateKeyFileStorage(tempBaseDir, notary.KeyExtension)
require.NoError(t, err)
err = fileStore.Set("one", bBytes)
require.NoError(t, err)
err = fileStore.Set("two", b2Bytes)
Expand Down

0 comments on commit 5be0a47

Please sign in to comment.