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

Feat/bats docs tdd #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Feat/bats docs tdd #4

wants to merge 5 commits into from

Conversation

whilei
Copy link
Owner

@whilei whilei commented Jun 7, 2018

No description provided.

whilei added 3 commits June 6, 2018 10:49
solution: separate cmd and flag default env vars
problem: bats tests default geth cmd should not include flags
solution: share set up env code by using bats 'load' call
#!/usr/bin/env bats

# Current build.
: ${GETH_CMD:=$GOPATH/bin/geth}
Copy link
Owner Author

Choose a reason for hiding this comment

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

so refactory, much sharey


# Current build.
: ${GETH_CMD:=$GOPATH/bin/geth}
: ${GETH_OPTS:=--datadir $BATS_TMPDIR \
Copy link
Owner Author

Choose a reason for hiding this comment

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

Much sharing, very factored.

@whilei whilei force-pushed the feat/bats-docs-tdd branch from 2152043 to 9777aa0 Compare June 7, 2018 09:32
#!/usr/bin/env bats

# Current build.
# NOTE: Use the given temp data dir from Bats as ephemeral data-dir.
Copy link
Owner Author

Choose a reason for hiding this comment

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

Use the given temp data dir from Bats as ephemeral data-dir.


# So that we don't have to bundle hardcoded test cases and dependencies
# like this dumb key along with geth production executables.
# NOTE-
Copy link
Owner Author

Choose a reason for hiding this comment

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

It also seems like someday it would be good to extract this kind of testing to it's own repo.

So that we don't have to bundle hardcoded test cases and dependencies
like this dumb key along with geth production executables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant