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

Fix e2e test setup #545

Merged
merged 8 commits into from
Jun 27, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/aragon-cli/src/commands/apm_cmds/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ exports.handler = async args => {
`Successfully executed: "${ctx.transactionPath[0].description}"`
)
} else {
reporter.success(`Successfully published ${appName} v${version}: `)
reporter.success(`Successfully published ${appName} v${version} : `)
if (!onlyContent) {
reporter.info(`Contract address: ${contractAddress}`)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,13 @@ function sanityCheck(
modulePath,
artifact
) {
const { environments, contractPath } = artifact
const { appName, registry, network } = environments[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

It was failing here because environments is not an array.
That being said environments['default'] does not feel alright either.


const { environments, path } = artifact
const { appName, registry, network } = environments['default']
return (
networkName !== network ||
moduleAppName !== appName ||
moduleRegistry !== registry ||
modulePath !== contractPath
modulePath !== path
)
}

Expand Down
23 changes: 22 additions & 1 deletion packages/e2e-tests/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# End-to-end tests

To test only one file, try:
`npm test -- src/cli/ipfs.test.js`

```sh
npm test -- src/cli/version.test.js
```

## Local environment

Some commands like `aragon run` depend on a local dev environment (ipfs, ganache).

We set up this up during the `pretest` hook & tear it down during the `posttest` hook.

Pretest:

* Start IPFS
* Start Ganache
* Create a test app

Posttest:

* Stop IPFS
* Stop Ganache
* Delete the test app
Loading