Skip to content

Commit

Permalink
fix Haskell FFI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
battermann authored and beltram committed Jan 11, 2024
1 parent dc3842b commit 815e320
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions ffi/bindings/haskell/test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ main = hspec $ do
expiration
now
pubKeyBundle
pending
actual `shouldBe` Left "Error: 9"
it "should return a valid access token" $ do
actual <-
Expand All @@ -44,9 +43,7 @@ main = hspec $ do
expiration
now
pubKeyBundle
pending
isRight actual `shouldBe` True

where
pubKeyBundle =
"-----BEGIN PRIVATE KEY-----\n\
Expand All @@ -55,18 +52,18 @@ main = hspec $ do
\-----BEGIN PUBLIC KEY-----\n\
\MCowBQYDK2VwAyEAdYI38UdxksC0K4Qx6E9JK9YfGm+ehnY18oKmHL2YsZk=\n\
\-----END PUBLIC KEY-----\n"
uid = fromMaybe (error "invalid user id") $ UUID.fromString "dbb07e94-7d29-4180-a790-a573def35dd5"
uid = fromMaybe (error "invalid user id") $ UUID.fromString "b20b8c78-b26d-43a4-af24-f72a3cb6f606"
proofExpiring2038 =
"eyJhbGciOiJFZERTQSIsInR5cCI6ImRwb3Arand0IiwiandrIjp7Imt0eSI6Ik9LUCIsImNydiI6IkVkMjU1MTkiLCJ4IjoidUhNR0paWllUbU9zOEdiaTdaRUJLT255TnJYYnJzNTI1dE1QQUZoYjBzbyJ9fQ.eyJpYXQiOjE2Nzg4MDUyNTgsImV4cCI6MjA4ODc3MzI1OCwibmJmIjoxNjc4ODA1MjU4LCJzdWIiOiJpbTp3aXJlYXBwPVpHSmlNRGRsT1RRM1pESTVOREU0TUdFM09UQmhOVGN6WkdWbU16VmtaRFUvN2M2MzExYTFjNDNjMmJhNkB3aXJlLmNvbSIsImp0aSI6ImQyOWFkYTQ2LTBjMzYtNGNiMS05OTVlLWFlMWNiYTY5M2IzNCIsIm5vbmNlIjoiYzB0RWNtOUNUME00TX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VXD2_E4j4sLcvD284Fj4z_6xmwA0czcP8wzHZmqPpel60HUqDVKDx5GmiWbFWix-E7ZXvYfvZ7NmxlDrgmAg"

clientId = 8963027069877103526
domain = "wire.com"
nonce = "c0tEcm9CT0M4MzJSN3F4d0FHWExLb1RnZ045SzlHWnM"
url = "https://wire.example.com/clients/8963027069877103526/access-token"
clientId = 14730821443162901434
domain = "example.com"
nonce = "VvGbw6eVTNGSQbK5SeiSbA"
url = "https://example.com/clients/cc6e640e296e8bba/access-token"
method = "POST"
maxSkewSeconds = 5
expiration = 2136351646
now = 360
handle = "horst"
teamId = fromMaybe (error "invalid team id") $ UUID.fromString "d82c9fa1-b8c5-4023-82d6-cacee85e6a2b"
maxSkewSeconds = 1
expiration = 1831212562
now = 1704982162
handle = "phuhhibdhqbqxrzbnsafw"
teamId = fromMaybe (error "invalid team id") $ UUID.fromString "40251680-35e1-4374-b3aa-75600de79e33"

0 comments on commit 815e320

Please sign in to comment.