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 fixes - gateway and more #710

Merged
merged 5 commits into from Feb 1, 2015
Merged

sharness fixes - gateway and more #710

merged 5 commits into from Feb 1, 2015

Conversation

jbenet
Copy link
Member

@jbenet jbenet commented Feb 1, 2015

  • common hashes file: lib/test-lib-hashes.sh
  • better init daemon that checks for both API and Gateway
  • core: move stdout print to daemon cmd (breaks test)
  • Gateway config (readonly and writable)
  • note in t0110-gateway.sh re ports
  • move t0100-gateway-http.sh -> t0110-gateway-writable.sh
  • make sure we use a portable tcp port check (ss not everywhere)
  • make sure all variable output is properly escaped. (always cmd "$VAR". never 'cmd $VAR')
  • show sharness test options in verbose output
  • dont use $path (sometimes conflicts with some user define paths)
  • make sure t0111-gateway-writable.sh passes.

cc:

  • @mildred check out changes for portable checks + a failure I get.
  • @chriscool lmk if i'm doing anything wrong here

@jbenet jbenet added the status/in-progress In progress label Feb 1, 2015
@jbenet jbenet mentioned this pull request Feb 1, 2015
@jbenet
Copy link
Member Author

jbenet commented Feb 1, 2015

@mappum does jenkins nor have curl? do we need to install it? Or, does wget have a portable way to output to stdout? curl is nicer in general-- may have to install it.

@whyrusleeping
Copy link
Member

LGTM, covers a nice amount of test cases

@mappum
Copy link
Contributor

mappum commented Feb 1, 2015

@mappum does jenkins nor have curl? do we need to install it?

Correct. Installing it is the best bet since wget doesn't support a lot of the stuff we need (e.g. PUT and DELETE requests).

@jbenet
Copy link
Member Author

jbenet commented Feb 1, 2015

doesnt rebase well so im going to squash everything

- core: daemon stdout print to cmd + daemon init checks
- core: fixed bug where the gateway was printed as "API"
- sharness/test-lib: daemon init checks
- sharness/test-lib: portable TCP port check
- sharness/init: fix test bits output
- sharness: use common hashes in one place.
- move t0100-http-gateway -> t0111-gateway-writable
- sharness: test-lib funcs for gateway config
- sharness/t0111-gateway-writable: use sh funcs
- sharness/t0111-gateway-writable: fixes
  - escape all vars (always `cmd "$VAR"` never `cmd $VAR`)
  - use $FILEPATH, not $path
  - last test seems to fail
Not sure why this fd redirect was here. Is it necessary?
Tests seem to pass for me.

cc @mildred
@jbenet
Copy link
Member Author

jbenet commented Feb 1, 2015

Installing curl portably might be messy. maybe we should use a go tool like https://github.com/dgryski/gttp downside is maybe it wont have a nice curl feature...

@jbenet
Copy link
Member Author

jbenet commented Feb 1, 2015

I want to move to doing all our installations from ipfs. that would be really nice.

@jbenet
Copy link
Member Author

jbenet commented Feb 1, 2015

It also wastes resources (particularly testing time) to install every time. I'll install curl in jenkins for now and we can find a good way to install it if its not available later on.

@jbenet
Copy link
Member Author

jbenet commented Feb 1, 2015

Ok... curl is installed. but somehow jenkins proc cant find it.

@btc
Copy link
Contributor

btc commented Feb 1, 2015

Is curl installed on the "bare-metal" vm? (Jenkins runs in a docker container)

jbenet added a commit that referenced this pull request Feb 1, 2015
sharness fixes - gateway and more
@jbenet jbenet merged commit 282be4f into master Feb 1, 2015
@jbenet jbenet removed the status/in-progress In progress label Feb 1, 2015
@jbenet jbenet deleted the sharness-gateway-fix branch February 1, 2015 08:44
@chriscool
Copy link
Contributor

I wonder why my comments don't appear near the lines that I clicked on?

@chriscool
Copy link
Contributor

PR #718 (test/sharness: improve t0111 using test_cmp) replaces "diff -u" with "test_cmp".

hacdias pushed a commit to ipfs/boxo that referenced this pull request Jan 27, 2023
sharness fixes - gateway and more

This commit was moved from ipfs/kubo@282be4f
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.

None yet

5 participants