cli/command/trust: remove TestGetSignableRolesForTargetAndRemoveError
This test was only testing trust.GetSignableRoles to return an error
if it's offline, which was duplicating the [TestGetSignableRolesError]
test.
[TestGetSignableRolesError]: fe0a8d2791/cli/trust/trust_test.go (L49-L55)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
d4217eb205
commit
1d8f87a2fb
@ -9,8 +9,6 @@ import (
|
|||||||
"github.com/docker/cli/internal/test"
|
"github.com/docker/cli/internal/test"
|
||||||
"github.com/docker/cli/internal/test/notary"
|
"github.com/docker/cli/internal/test/notary"
|
||||||
"github.com/theupdateframework/notary/client"
|
"github.com/theupdateframework/notary/client"
|
||||||
"github.com/theupdateframework/notary/passphrase"
|
|
||||||
"github.com/theupdateframework/notary/trustpinning"
|
|
||||||
"gotest.tools/v3/assert"
|
"gotest.tools/v3/assert"
|
||||||
is "gotest.tools/v3/assert/cmp"
|
is "gotest.tools/v3/assert/cmp"
|
||||||
"gotest.tools/v3/golden"
|
"gotest.tools/v3/golden"
|
||||||
@ -151,14 +149,6 @@ func TestTrustRevokeCommand(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetSignableRolesForTargetAndRemoveError(t *testing.T) {
|
|
||||||
notaryRepo, err := client.NewFileCachedRepository(t.TempDir(), "gun", "https://localhost", nil, passphrase.ConstantRetriever("password"), trustpinning.TrustPinConfig{})
|
|
||||||
assert.NilError(t, err)
|
|
||||||
target := client.Target{}
|
|
||||||
err = getSignableRolesForTargetAndRemove(target, notaryRepo)
|
|
||||||
assert.Error(t, err, "client is offline")
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestRevokeTrustPromptTermination(t *testing.T) {
|
func TestRevokeTrustPromptTermination(t *testing.T) {
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
t.Cleanup(cancel)
|
t.Cleanup(cancel)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user