From d4217eb205e1014be5a13c5519f1177630a5f629 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 2 Mar 2025 13:47:32 +0100 Subject: [PATCH] cli/command/trust: remove TestGetOrGenerateNotaryKeyAndInitRepo This test was only testing trust.GetSignableRoles to return an error if it's offline, which was duplicating the [TestGetSignableRolesError] test. [TestGetSignableRolesError]: https://github.com/docker/cli/blob/fe0a8d27912dc6fddc60cedcd35bbef27b776355/cli/trust/trust_test.go#L49-L55 Signed-off-by: Sebastiaan van Stijn --- cli/command/trust/helpers_test.go | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 cli/command/trust/helpers_test.go diff --git a/cli/command/trust/helpers_test.go b/cli/command/trust/helpers_test.go deleted file mode 100644 index 9ce19259d1..0000000000 --- a/cli/command/trust/helpers_test.go +++ /dev/null @@ -1,18 +0,0 @@ -package trust - -import ( - "testing" - - "github.com/theupdateframework/notary/client" - "github.com/theupdateframework/notary/passphrase" - "github.com/theupdateframework/notary/trustpinning" - "gotest.tools/v3/assert" -) - -func TestGetOrGenerateNotaryKeyAndInitRepo(t *testing.T) { - notaryRepo, err := client.NewFileCachedRepository(t.TempDir(), "gun", "https://localhost", nil, passphrase.ConstantRetriever(passwd), trustpinning.TrustPinConfig{}) - assert.NilError(t, err) - - err = getOrGenerateRootKeyAndInitRepo(notaryRepo) - assert.Error(t, err, "client is offline") -}