Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run plutus script with testnet in tests #2866

Merged
merged 1 commit into from
Jun 28, 2021
Merged

Conversation

newhoggy
Copy link
Contributor

No description provided.

@newhoggy newhoggy force-pushed the run-plutus-script-in-test branch 3 times, most recently from 8009791 to 5a3aa89 Compare June 25, 2021 05:19
@newhoggy
Copy link
Contributor Author

Example output:

$ cabal test cardano-testnet
Build profile: -w ghc-8.10.4 -O1
In order, the following will be built (use -v for more details):
 - cardano-testnet-1.27.0 (test:cardano-testnet-tests) (ephemeral targets)
Preprocessing test suite 'cardano-testnet-tests' for cardano-testnet-1.27.0..
Building test suite 'cardano-testnet-tests' for cardano-testnet-1.27.0..
Running 1 test suites...
Test suite cardano-testnet-tests: RUNNING...
test/Spec.hs
  Spec
    Plutus: OK (26.11s)
        ✓ Plutus passed 1 test.

All 1 tests passed (26.11s)
Test suite cardano-testnet-tests: PASS
Test suite logged to:
/Users/jky/wrk/iohk/cardano-node/dist-newstyle/build/x86_64-osx/ghc-8.10.4/cardano-testnet-1.27.0/t/cardano-testnet-tests/test/cardano-testnet-1.27.0-cardano-testnet-tests.log
1 of 1 test suites (1 of 1 test cases) passed.

Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great!! Nice work @newhoggy. We should definitely (at some point) document this for users.

@Jimbo4350
Copy link
Contributor

@newhoggy I think need some sort of feedback mechanism from the script to the test to that confirms the UTxO was successfully spent.

@newhoggy
Copy link
Contributor Author

I'll look at confirming the UTxO was spent in a subsequent PR.

@newhoggy newhoggy force-pushed the run-plutus-script-in-test branch 3 times, most recently from 62c3f8a to b0979f6 Compare June 28, 2021 04:05
Also:

* Remove files that were left behind in a prior refactoring
* Modify plutus script to allow the cardano-cli location to be configurable
* Modify plutus script to be able to run from any directory
* Return runtime information from the testnet for use by the plutus script
@newhoggy
Copy link
Contributor Author

bors merge

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jun 28, 2021

@iohk-bors iohk-bors bot merged commit 1996230 into master Jun 28, 2021
@iohk-bors iohk-bors bot deleted the run-plutus-script-in-test branch June 28, 2021 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants