diff --git a/pkg/king/test/AmesTests.hs b/pkg/king/test/AmesTests.hs index 6aedcea929..eb5e009b1c 100644 --- a/pkg/king/test/AmesTests.hs +++ b/pkg/king/test/AmesTests.hs @@ -113,8 +113,8 @@ twoTalk = forAll arbitrary (ioProperty . runNetworkApp . runTest) go aliceShip bobShip val = runRAcquire $ do (aliceQ, alice) <- runGala aliceShip (bobQ, bob) <- runGala bobShip - sendThread alice (Galaxy bobShip, val) - sendThread bob (Galaxy aliceShip, val) + sendThread alice (Patp bobShip, val) + sendThread bob (Patp aliceShip, val) liftIO (waitForPacket aliceQ val >> waitForPacket bobQ val) tests :: TestTree @@ -140,10 +140,12 @@ instance Arbitrary Ipv4 where arbitrary = Ipv4 <$> arb instance Arbitrary Port where arbitrary = Port <$> arb instance Arbitrary Wen where arbitrary = Wen <$> arb instance Arbitrary Gap where arbitrary = Gap . abs <$> arb -instance Arbitrary Galaxy where arbitrary = Galaxy <$> arb instance Arbitrary Bytes where arbitrary = pure (MkBytes "wtfbbq") -- MkBytes . take 100 <$> arb +instance Arbitrary a => Arbitrary (Patp a) where + arbitrary = Patp <$> arb + instance Arbitrary ByteString where arbitrary = pack <$> arbitrary diff --git a/pkg/king/test/ArvoTests.hs b/pkg/king/test/ArvoTests.hs index b4d81f8893..16cb2029c2 100644 --- a/pkg/king/test/ArvoTests.hs +++ b/pkg/king/test/ArvoTests.hs @@ -85,11 +85,13 @@ instance Arbitrary File where arbitrary = File <$> arb instance Arbitrary Cord where arbitrary = Cord <$> arb instance Arbitrary Wen where arbitrary = Wen <$> arb instance Arbitrary Gap where arbitrary = Gap . abs <$> arb -instance Arbitrary Galaxy where arbitrary = Galaxy <$> arb instance Arbitrary Port where arbitrary = Port <$> arb instance Arbitrary Ship where arbitrary = Ship <$> arb instance Arbitrary Address where arbitrary = AAmes <$> arb +instance Arbitrary a => Arbitrary (Patp a) where + arbitrary = Patp <$> arb + genIpv4 :: Gen Ipv4 genIpv4 = do x <- arbitrary