We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41af101 commit 530ca43Copy full SHA for 530ca43
hnix-store-core/tests/Fingerprint.hs
@@ -32,10 +32,13 @@ spec_fingerprint = do
32
it "allows a successful signature verification" $ do
33
let msg = Text.encodeUtf8 $ metadataFingerprint def exampleStorePath exampleMetadata
34
Signature sig' =
35
- head
36
- $ sig
37
- <$> filter (\(NarSignature publicKey _) -> publicKey == "cache.nixos.org-1")
38
- (Set.toList (metadataSigs exampleMetadata))
+ case
+ sig
+ <$> filter (\(NarSignature publicKey _) -> publicKey == "cache.nixos.org-1")
+ (Set.toList (metadataSigs exampleMetadata))
39
+ of
40
+ (x:_) -> x
41
+ _ -> error "impossible"
42
sig' `shouldSatisfy` Ed25519.verify pubkey msg
43
44
exampleFingerprint :: Text
0 commit comments