linting: cli/command/trust: unusedwrite: unused write to field Hashes (govet)

cli/command/trust/sign_test.go:211:9: unusedwrite: unused write to field Hashes (govet)
        target.Hashes, target.Length, err = getSignedManifestHashAndSize(notaryRepo, "test")
               ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-11-20 15:59:39 +01:00
parent 580ebf41a0
commit efbcdce9b9
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 2 deletions

View File

@ -207,8 +207,7 @@ func TestAddStageSigners(t *testing.T) {
func TestGetSignedManifestHashAndSize(t *testing.T) { func TestGetSignedManifestHashAndSize(t *testing.T) {
notaryRepo, err := client.NewFileCachedRepository(t.TempDir(), "gun", "https://localhost", nil, passphrase.ConstantRetriever(passwd), trustpinning.TrustPinConfig{}) notaryRepo, err := client.NewFileCachedRepository(t.TempDir(), "gun", "https://localhost", nil, passphrase.ConstantRetriever(passwd), trustpinning.TrustPinConfig{})
assert.NilError(t, err) assert.NilError(t, err)
target := &client.Target{} _, _, err = getSignedManifestHashAndSize(notaryRepo, "test")
target.Hashes, target.Length, err = getSignedManifestHashAndSize(notaryRepo, "test")
assert.Error(t, err, "client is offline") assert.Error(t, err, "client is offline")
} }