-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
\o/ Thank you @chriscool :D Do all of these run for you? Found any issues? Can I get a status of this endeavour? I know you have been trying to reach me through IRC, unfortunately, with DEVCON2 I wasn't the most available. I'll have good wifi when the 29th of September comes. |
There are a few that don't pass. For example I think the first to fail is the 5st or the 6st because The Makefile also implements |
I think it would be good to leave the failing as failing for now so we can make a list and check things off :) |
Yeah, add all the tests @chriscool, if they fail, the better, more stuff for us to fix :D @chriscool idealy, we want:
|
5d5d360
to
c264f74
Compare
@diasdavid ok, I removed failing tests from t0010, so now everything should pass and you can merge this. |
By the way, tests should either be run using This is because a symbolic link from 'js-ipfs/test/bin/ipfs' to 'js-ipfs/src/cli/bin.js' is used to make it possible for the tests to run without having to change them much. The path to 'js-ipfs/test/bin' is added into PATH by test-lib.sh which is sourced by all the test scripts. |
This last commit adds a check and improves the error message. |
@@ -0,0 +1,107 @@ | |||
# Generic test functions for go-ipfs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can start calling it the IPFS cli :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Year, sure I will change that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to: # Generic test functions for ipfs cli tests
@which curl >/dev/null || (echo "Please install curl!" && false) | ||
|
||
.PHONY: all help clean clean-test-results $(T) aggregate deps sharness | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we bring the Makefile to the root, so we can run it on CI by adding a line with make
to:
https://github.com/ipfs/js-ipfs/blob/master/.travis.yml#L14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In go-ipfs there is also a Makefile at the root, but it is different.
You use make test
at the root and make
when you are in test/sharness.
I can do something like that but it could go into another PR I think as it is related to the whole project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chriscool what I'm looking for is to be able to add these sharness tests to CI before this merge. Can we get that added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, with the last commit I added you can just run make test
at the root.
I will add that to the '.travis.yml'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added that and it works.
HASH_WELCOME_DOCS="QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG" | ||
HASH_GATEWAY_ASSETS="QmXB7PLRWH6bCiwrGh2MrBBjNkLv3mY3JdYXCikYZSwLED" | ||
HASH_HELP_PAGE="QmY5heUM5qgRubMDD1og9fhCPA6QdkMp3QCwd4s7gJsyE7" | ||
HASH_EMPTY_DIR="QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, these change often (//cc @lgierth) how does go-ipfs handle it? Changing it manually everytime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't change so often, so I think manually is fine for now.
Last time they changed was in January.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We update them manually here every time we update them in go-ipfs
\o/ woot! There is a lot of bash magic, but they do work for me, so awesome! :D Once we have CI running these, I'm happy to merge. Then we can see all the remaining PR's for each subcommand coming in :) Super excited about this, getting the same level of robustness as the Go implementation 🌟 |
This Makefile is just to launch Sharness tests for now.
1a56722
to
c0f1c5d
Compare
@diasdavid just pushed with the following changes:
|
This all LGTM. Its just the base sharness setup, same as in go-ipfs |
@diasdavid could you take a look at merging this? |
@chriscool done, thank you :) Can you start opening the PR for each of the subcommands now? If possible, listing which tests fail, so that we can fix them :) |
@diasdavid ok I will do that now. |
This is to start testing js-ipfs in the same way as go-ipfs.
See issue #412 (Sharness tests).