test(pgp): temporary fix for random order test

This commit is contained in:
jguer 2020-12-10 00:29:56 +01:00
parent c85bbf54da
commit 182f4c7f6c
No known key found for this signature in database
GPG Key ID: 6D6CC9BEA8556B35
5 changed files with 14 additions and 9 deletions

View File

@ -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:

View File

@ -1,5 +1,5 @@
:: PGP keys need importing:
 -> 487EACC08557AD082088DABA1EB2638FF56C0C53, required by: cower
:: Importing keys with gpg...
:: PGP keys need importing:

View File

@ -1,5 +1,5 @@
:: PGP keys need importing:
 -> C52048C0C0748FEE227D47A2702353E0F7E48EDB, required by: dummy-3
:: Importing keys with gpg...
:: PGP keys need importing:

View File

@ -1,6 +1,6 @@
:: PGP keys need importing:
 -> 11E521D646982372EB577A1F8F0871F202119294, required by: libc++
 -> B6C8F98282B944E3B0D5C2530FC3042E345AD05D, required by: libc++
:: Importing keys with gpg...
:: PGP keys need importing:

View File

@ -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.