diff --git a/pkg/pgp/.snapshots/TestCheckPgpKeys-Two_dummy_packages_requiring_the_same_key b/pkg/pgp/.snapshots/TestCheckPgpKeys-Two_dummy_packages_requiring_the_same_key index f2007e27..ff197274 100644 --- a/pkg/pgp/.snapshots/TestCheckPgpKeys-Two_dummy_packages_requiring_the_same_key +++ b/pkg/pgp/.snapshots/TestCheckPgpKeys-Two_dummy_packages_requiring_the_same_key @@ -1,5 +1,5 @@ -:: PGP keys need importing: +  -> ABAF11C65A2970B130ABE3C479BE3E4300411886, required by: dummy-1 (dummy-1 dummy-2) :: Importing keys with gpg... - +:: PGP keys need importing: diff --git a/pkg/pgp/.snapshots/TestCheckPgpKeys-_one_valid_key_not_yet_in_the_keyring b/pkg/pgp/.snapshots/TestCheckPgpKeys-_one_valid_key_not_yet_in_the_keyring index c3706d2c..55d669f0 100644 --- a/pkg/pgp/.snapshots/TestCheckPgpKeys-_one_valid_key_not_yet_in_the_keyring +++ b/pkg/pgp/.snapshots/TestCheckPgpKeys-_one_valid_key_not_yet_in_the_keyring @@ -1,5 +1,5 @@ -:: PGP keys need importing: +  -> 487EACC08557AD082088DABA1EB2638FF56C0C53, required by: cower :: Importing keys with gpg... - +:: PGP keys need importing: diff --git a/pkg/pgp/.snapshots/TestCheckPgpKeys-one_already_in_keyring b/pkg/pgp/.snapshots/TestCheckPgpKeys-one_already_in_keyring index a378d7b5..d67cb9fc 100644 --- a/pkg/pgp/.snapshots/TestCheckPgpKeys-one_already_in_keyring +++ b/pkg/pgp/.snapshots/TestCheckPgpKeys-one_already_in_keyring @@ -1,5 +1,5 @@ -:: PGP keys need importing: +  -> C52048C0C0748FEE227D47A2702353E0F7E48EDB, required by: dummy-3 :: Importing keys with gpg... - +:: PGP keys need importing: diff --git a/pkg/pgp/.snapshots/TestCheckPgpKeys-two_valid_keys_not_yet_in_the_keyring b/pkg/pgp/.snapshots/TestCheckPgpKeys-two_valid_keys_not_yet_in_the_keyring index f0429909..cd926a28 100644 --- a/pkg/pgp/.snapshots/TestCheckPgpKeys-two_valid_keys_not_yet_in_the_keyring +++ b/pkg/pgp/.snapshots/TestCheckPgpKeys-two_valid_keys_not_yet_in_the_keyring @@ -1,6 +1,6 @@ -:: PGP keys need importing: +  -> 11E521D646982372EB577A1F8F0871F202119294, required by: libc++  -> B6C8F98282B944E3B0D5C2530FC3042E345AD05D, required by: libc++ :: Importing keys with gpg... - +:: PGP keys need importing: diff --git a/pkg/pgp/keys_test.go b/pkg/pgp/keys_test.go index 76370f07..cfcd2f3a 100644 --- a/pkg/pgp/keys_test.go +++ b/pkg/pgp/keys_test.go @@ -9,6 +9,8 @@ import ( "os" "path" "regexp" + "sort" + "strings" "testing" gosrc "github.com/Morganamilo/go-srcinfo" @@ -255,7 +257,10 @@ func TestCheckPgpKeys(t *testing.T) { out, _ := ioutil.ReadAll(r) os.Stdout = rescueStdout - cupaloy.SnapshotT(t, string(out)) + splitLines := strings.Split(string(out), "\n") + sort.Strings(splitLines) + + cupaloy.SnapshotT(t, strings.Join(splitLines, "\n")) return } // Here, we want to see the error.