Commit Graph

227 Commits

Author SHA1 Message Date
Juan Batiz-Benet
edbca27019 sharness/t0110-gateway: fix /s fail on osx
the test cases were failing for me on osx. Removing /s fixes them.
It should be fine not to check the /s.
2015-03-17 06:06:00 -07:00
Christian Couder
6cc0a6b1de test/bin: fix continueyn on Linux
It looks like there were two problems:

- "read" command probably needs the name of the variable
  it reads into

- [[ didn't work

This might be because on Linux /bin/sh is sometimes not
bash. For example on Ubuntu it is a symlink to dash.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-16 20:02:02 +01:00
Juan Batiz-Benet
36e6286560 Merge pull request #929 from jbenet/t0051_fix_indentation
t0051: fix indentation
2015-03-16 01:30:10 -07:00
Christian Couder
ef85f67610 t0051: fix indentation
Fix indentation and use > instead of >> to create
an expected file.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-15 17:00:09 +01:00
Tommi Virtanen
fdd1cd8dc0 Remove fsrepo.At, make Open a constructor function
Nobody calls At without immediately calling Open.

First step, a mechanical transformation. Cleanups will follow.
2015-03-13 20:19:03 -07:00
Juan Batiz-Benet
90d2113f99 Merge pull request #896 from jbenet/t0060_reactivate_daemon_tests
t0060: reactivate daemon tests
2015-03-10 15:55:52 -07:00
Henry
b688e72de0 ipfs object put: return error if object is empty (fixes #883) 2015-03-10 22:58:50 +01:00
Juan Batiz-Benet
e06016116d Merge pull request #895 from jbenet/sharness_check_curl_response
sharness: add function to test curl response
2015-03-10 08:39:55 -07:00
Christian Couder
37bfef884c t0060: reactivate daemon tests
Tests in this script had been deactivated because
there was no good way to wait until the daemon was
ready. Now that we can use pollEndpoint for that
it's time to reactivate the tests.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-10 15:02:19 +01:00
Christian Couder
c39b5a7430 sharness: add function to test curl response
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-10 14:56:09 +01:00
Christian Couder
f67522e3f3 sharness/README: add writing tests and debugging
Add information from the discussion of PR #891.
While at it, suggest using -v and -i options to debug one test.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-10 14:51:44 +01:00
Christian Couder
60081ebc3b t0110: replace wget with curl
This removes the dependency on wget, and, while at it, cleanups a bit.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-08 08:35:44 +01:00
Christian Couder
e1a33a0e92 t0045: style cleanup and add missing &&
This makes the following changes:

- remove some superfluous \ at the end of some lines
- use `cat <<-\EOF >expected` to ignore the starting tabs
  in the here document
- add missing && after some `cat`
- use test_cmp to compare files

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-07 20:26:45 +01:00
Henry
2a0cd6d3d3 object: added sharness tests for get, put and stat 2015-03-07 16:50:30 +01:00
Christian Couder
b01e535115 t0110: cleanup using expr
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-03-04 21:02:32 +01:00
Juan Batiz-Benet
04a3a66c6c sharness/testlib: seed RANDOM
this is ugly. ideally would seed using date, but unclear
what a portable datetime is. date '+%s' doesnt work on osx.
2015-03-04 08:17:55 -08:00
Juan Batiz-Benet
0510633a17 tests/sharness: t0111-gateway-writable
ideally this port would be a randomly picked unused port.
for now we just pick a different port than t0110-gateway.
2015-03-04 08:17:54 -08:00
Juan Batiz-Benet
2a40d7679e test/sharness: randomize api port workaround
we have a problem where initializing daemons with the same api port
often fails-- it hangs indefinitely. The proper solution is to make
ipfs pick an unused port for the api on startup, and then use that.
Unfortunately, ipfs doesnt yet know how to do this-- the api port
must be specified. Until ipfs learns how to do this, we must use
specific port numbers, which may still fail but less frequently
if we at least use different ones.
2015-03-04 07:34:05 -08:00
Juan Batiz-Benet
999471d9bf test/sharness/t004-add-cat: quote hashes 2015-03-04 07:34:05 -08:00
Henry
14090d4a11 moved pollEndpoint to thirdparty/ 2015-03-04 16:25:41 +01:00
Henry
aa745fef07 specify new dep in sharenss Makefile 2015-03-04 15:06:26 +01:00
Henry
0204a0c174 cat log output on fail 2015-03-04 14:53:30 +01:00
Henry
56a32a306c using pollEndpoint to block in tests for 'daemon ready' (updates #844) 2015-03-04 14:50:17 +01:00
Juan Batiz-Benet
9f27556090 Merge pull request #823 from BrendanBenshoof/master
fixing bug 812
2015-03-02 17:02:24 -08:00
bbenshoof
ed179263f4 split the tests 2015-03-02 17:55:01 -05:00
Juan Batiz-Benet
8ec5182186 Merge pull request #838 from jbenet/t0111_fix_double_quoting
t0111: fix broken test due to bad double quoting
2015-03-02 14:35:14 -08:00
bbenshoof
ac5cfc5664 fixing bug 812 2015-03-02 17:07:21 -05:00
Henry
220aaf2802 sharness: don't be to smart about creating testData 2015-03-01 14:03:51 +01:00
Henry
9cf718932e ipfs ls: make sure to fully create testData 2015-03-01 14:03:51 +01:00
Henry
f5f5d5d9d2 newIpfsLs: add shareness test 2015-03-01 14:03:51 +01:00
Christian Couder
17ca4f6429 t0111: use expr again to check location
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-28 18:27:54 +01:00
Christian Couder
f82526a5ca t0111: use URL variable to clarify code
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-28 08:21:55 +01:00
Christian Couder
d9d758cfde t0111: use "expr" more to check Location
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-28 08:14:15 +01:00
Christian Couder
158affac99 t0111: use "expr" to check Location
This makes it possible to simplify the code.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-28 08:06:04 +01:00
Christian Couder
c844fffef2 t0111: fix broken test due to bad double quoting
There was basically:

  curl ... "$URL 2>curl.out"

instead of:

  curl ... "$URL" 2>curl.out

So "curl.out" was not properly overwritten by the curl command.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-27 22:09:11 +01:00
Jeromy
7fb63d7e43 move signing options into a validation checker struct 2015-02-26 22:05:03 -08:00
Jeromy
049b5ad945 make signing dht put records optional 2015-02-26 22:05:03 -08:00
Henry
92d08db7a5 rewrote import paths of go.net/context to use golang.org/x/context
- updated go-ctxgroup and goprocess
ctxgroup: AddChildGroup was changed to AddChild. Used in two files:
- p2p/net/mock/mock_net.go
- routing/dht/dht.go

- updated context from hg repo to git
prev. commit in hg was ad01a6fcc8a19d3a4478c836895ffe883bd2ceab. (context: make parentCancelCtx iterative)
represents commit 84f8955a887232b6308d79c68b8db44f64df455c in git repo

- updated context to master (b6fdb7d8a4ccefede406f8fe0f017fb58265054c)

Aaron Jacobs (2):
net/context: Don't accept a context in the DoSomethingSlow example.
context: Be clear that users must cancel the result of WithCancel.

Andrew Gerrand (1):
go.net: use golang.org/x/... import paths

Bryan C. Mills (1):
net/context: Don't leak goroutines in Done example.

Damien Neil (1):
context: fix removal of cancelled timer contexts from parent

David Symonds (2):
context: Fix WithValue example code.
net: add import comments.

Sameer Ajmani (1):
context: fix TestAllocs to account for ints in interfaces
2015-02-25 11:58:19 +01:00
Jeromy
7bc405d713 update the readme hash in sharness 2015-02-23 13:47:19 -08:00
Jeromy
6241c25984 make contructor code a little less magical 2015-02-18 19:11:33 +00:00
Brian Tiger Chow
bbc07b6bcc fix(config) rename variable GCR -> SNR 2015-02-15 06:29:15 -08:00
Brian Tiger Chow
bbcd89fbf2 fix(test/snr_client) use config.DefaultSNRServers 2015-02-15 06:26:47 -08:00
Brian Tiger Chow
aed1373a01 change log level 2015-02-15 04:41:19 -08:00
Brian Tiger Chow
87c6604b56 misc: add test for api readiness 2015-02-15 04:41:18 -08:00
Brian Tiger Chow
31587b2d0a debug: add gc-client TODO rm before merge
add automatic add and cat for debugging purposes

retry cats

cast string

argh! @whyrusleepgin

use mock repo to avoid clashing

larger files for more variety FIXUP into gc-client

fix: change in both places FIXUP gc-client

 fix(gc-client) start with size 1 (unit)

fix(gc-client) start at 1 FIXUP prev

gc-client rm comment

gc-client larger files

fix(gc-client) cat the data out to dev null to ensure entire file is fetched

perf(gc-client) use io.Pipe to handle io transfer

fixup
2015-02-15 04:41:17 -08:00
Brian Tiger Chow
2298cf66cf test GetPutRecord
validate doesn't work. the peer's public key is not present in the
peerstore.
2015-02-15 04:41:16 -08:00
Brian Tiger Chow
19eb35137b refactor(routing) rename grandcentral to supernode
thanks @mappum

remove .go-ipfs
2015-02-15 04:41:10 -08:00
Brian Tiger Chow
b34fee4ede test(gc) with 10 node integration test 2015-02-14 14:13:54 -08:00
Brian Tiger Chow
f17ede8334 refactor(integrationtest) use RoutingOptions in mocknet repo 2015-02-14 14:13:54 -08:00
Christian Couder
391b5a3c89 t0040: use multihash instead of shasum in tests
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-02-08 13:36:37 +01:00