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

sharness tests: output the problem #492

Closed
jbenet opened this issue Jan 5, 2015 · 1 comment
Closed

sharness tests: output the problem #492

jbenet opened this issue Jan 5, 2015 · 1 comment
Assignees

Comments

@jbenet
Copy link
Member

jbenet commented Jan 5, 2015

it would be nice if the sharness tests output the problem when they failed.

perhaps the way to do it is to have a command (per test case) that only gets run when the test case fails.

For example:

test_expect_success "ipfs init output looks good" '
    STARTHASH="QmYpv2VEsxzTTXRYX3PjDg961cnJE3kY1YDXLycHGQ3zZB" &&
    echo "initializing ipfs node at $IPFS_DIR" >expected &&
    echo "generating key pair...done" >>expected &&
    echo "peer identity: $PEERID" >>expected &&
    echo "\nto get started, enter: ipfs cat $STARTHASH" >>expected &&
    test_cmp expected actual_init
' '
    diff expected actual_init
'

this isn't the clearest thing ever, but may get the job done. this would require messing with sharness internals-- @chriscool any thoughts on easiest way to do this? or whether sharness already has a way of doing this?

@jbenet jbenet self-assigned this Jan 5, 2015
@jbenet jbenet added the status/in-progress In progress label Jan 5, 2015
@jbenet
Copy link
Member Author

jbenet commented Jan 5, 2015

Addressed in #493

@jbenet jbenet closed this as completed Jan 5, 2015
@jbenet jbenet removed the status/in-progress In progress label Jan 5, 2015
@jbenet jbenet mentioned this issue Jan 5, 2015
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this issue Oct 23, 2021
* test: augment TestProviderManager test, add notes of future tests
* refactor(provider-manager): order funcs, update names for consistency, add code docs
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

No branches or pull requests

1 participant