Skip to content

Commit

Permalink
Reorder the tests in copy.TestCreateSignature
Browse files Browse the repository at this point in the history
Separate "exceptional situations" tests from tests
of identity handling.

Should not change (test) behavior

Signed-off-by: Miloslav Trmač <[email protected]>
  • Loading branch information
mtrmac committed Jan 7, 2023
1 parent f91fec2 commit f292028
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions copy/sign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ func TestCreateSignature(t *testing.T) {
identity string
successfullySignedIdentity string // Set to expect a successful signing with testKeyFingerprint
}{
{
name: "dir: with no identity specified",
dest: dirDest,
identity: "",
},
{
name: "unknown key",
dest: dockerDest,
Expand All @@ -91,6 +86,12 @@ func TestCreateSignature(t *testing.T) {
dest: dockerDest,
identity: "myregistry.io/myrepo",
},

{
name: "dir: with no identity specified",
dest: dirDest,
identity: "",
},
{
name: "docker:// without overriding the identity",
dest: dockerDest,
Expand Down

0 comments on commit f292028

Please sign in to comment.