MCPcopy
hub / github.com/getsops/sops / TestPGPKeySourceFromString

Function TestPGPKeySourceFromString

pgp/keysource_test.go:745–756  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

743}
744
745func TestPGPKeySourceFromString(t *testing.T) {
746 s := "C8C5 2C0A B2A4 8174 01E8 12C8 F3CC 3233 3FAD 9F1E, C8C5 2C0A B2A4 8174 01E8 12C8 F3CC 3233 3FAD 9F1E"
747 ks := MasterKeysFromFingerprintString(s)
748 expected := "C8C52C0AB2A4817401E812C8F3CC32333FAD9F1E"
749 if ks[0].Fingerprint != expected {
750 t.Errorf("Fingerprint does not match. Got %s, expected %s", ks[0].Fingerprint, expected)
751 }
752
753 if ks[1].Fingerprint != expected {
754 t.Error("Fingerprint does not match")
755 }
756}

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.45

Tested by

no test coverage detected