Skip to content

Commit

Permalink
fix: keep ./tmp folder as it's needed for indexing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
euonymos committed Nov 28, 2024
1 parent e407192 commit 4a648d9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ haddocks
# Functions changed by runing local testnet
devnet/db
devnet/genesis-*.json
test.log
8 changes: 4 additions & 4 deletions test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import Voting (votingSpec)

main :: IO ()
main = hspec do
runIO clearLogs
ouraFiltersSpec
dynamicSpec
offChainSpec
auctionSpec
votingSpec
offChainSpec
dynamicSpec
runIO clearLogs
ouraFiltersSpec
5 changes: 2 additions & 3 deletions test/OffChain.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ offChainSpec = describe "Checking monad works" $ do
_blockchainParams <- queryBlockchainParams
return ()
it "Querying UTxO works" $ execOn $ do
address <- signingKeyToAddress <$> (!! 0) <$> getTestWalletSks
address <- signingKeyToAddress . (!! 0) <$> getTestWalletSks
_utxo <- queryUtxo $ ByAddresses [address]
return ()
it "Sending transaction works" $ execOn $ do
Expand All @@ -50,8 +50,7 @@ offChainSpec = describe "Checking monad works" $ do
out userAddress =
TxOut
userAddress
( convert (lovelaceToValue $ fromInteger 3_000_000)
)
(convert $ lovelaceToValue 3_000_000)
TxOutDatumNone
ReferenceScriptNone
tx =
Expand Down
2 changes: 1 addition & 1 deletion test/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ submitAndCheck :: (MonadSubmitTx m, MonadIO m) => TxSpec -> m ()
submitAndCheck spec = do
case head $ actions spec of
MkSomeCEMAction (MkCEMAction _ transition) ->
liftIO $ putStrLn $ "Doing " <> show transition
liftIO $ putStrLn $ " --> " <> show transition
awaitEitherTx =<< resolveTxAndSubmit spec

perTransitionStats :: (MonadBlockchainParams m) => m (Map.Map String Fees)
Expand Down
10 changes: 5 additions & 5 deletions test/Voting.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Utils
votingSpec = describe "Voting" $ do
let ignoreTest (_name :: String) = const (return ())

-- FIXME: fix Voting budget
-- FIXME: fix Voting budget or fix this issue https://github.com/mlabs-haskell/clb/issues/50
ignoreTest "Successfull flow" $
execClb $ do
jury1 : jury2 : creator : _ <- getTestWalletSks
Expand All @@ -34,21 +34,22 @@ votingSpec = describe "Voting" $ do
}
params = MkCEMParams params' NoSingleStageParams
mkAction = MkSomeCEMAction . MkCEMAction params
-- Start

-- Create
submitAndCheck $
MkTxSpec
{ actions = [mkAction Create]
, specSigner = creator
}

-- Start
submitAndCheck $
MkTxSpec
{ actions = [mkAction Start]
, specSigner = creator
}

-- Vote

submitAndCheck $
MkTxSpec
{ actions = [mkAction $ Vote (signingKeyToPKH jury1) Yes]
Expand All @@ -62,12 +63,11 @@ votingSpec = describe "Voting" $ do
}

-- Count result

submitAndCheck $
MkTxSpec
{ actions = [mkAction Finalize]
, specSigner = jury2
}

Just state <- queryScriptState params
liftIO $ state `shouldBe` (Finalized Abstain)
liftIO $ state `shouldBe` Finalized Abstain
Empty file added tmp/.gitkeep
Empty file.

0 comments on commit 4a648d9

Please sign in to comment.