Skip to content

Commit

Permalink
hlint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhnanda committed Oct 9, 2023
1 parent 644552c commit 39f371c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions test/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ main = do
defaultMain $ tests appPool jobPool
where
getConnInfo = do
connectHost <- (fromMaybe "localhost") <$> lookupEnv "PGHOST"
connectUser <- (fromMaybe "jobs_test") <$> lookupEnv "PGUSER"
connectPassword <- (fromMaybe "jobs_test") <$> lookupEnv "PGPASSWORD"
connectDatabase <- (fromMaybe "jobs_test") <$> lookupEnv "PGDATABASE"
connectPort <- (maybe (fromIntegral (5432 :: Int)) read) <$> lookupEnv "PGPORT"
connectHost <- fromMaybe "localhost" <$> lookupEnv "PGHOST"
connectUser <- fromMaybe "jobs_test" <$> lookupEnv "PGUSER"
connectPassword <- fromMaybe "jobs_test" <$> lookupEnv "PGPASSWORD"
connectDatabase <- fromMaybe "jobs_test" <$> lookupEnv "PGDATABASE"
connectPort <- maybe (fromIntegral (5432 :: Int)) read <$> lookupEnv "PGPORT"
pure ConnectInfo{..}

createAppPool = do
Expand Down Expand Up @@ -328,8 +328,7 @@ payloadGen :: MonadGen m => m JobPayload
payloadGen = Gen.recursive Gen.choice nonRecursive recursive
where
nonRecursive = [ PayloadAlwaysFail <$> Gen.element [1, 2, 3]
, PayloadSucceed <$> Gen.element [1, 2, 3] <*> (Gen.maybe $ Gen.string (Range.singleton 10) Gen.alphaNum)

, PayloadSucceed <$> Gen.element [1, 2, 3] <*> Gen.maybe (Gen.string (Range.singleton 10) Gen.alphaNum)
]
recursive = [ PayloadFail <$> Gen.element [1, 2, 3] <*> payloadGen ]

Expand Down

0 comments on commit 39f371c

Please sign in to comment.