Commit Graph

110 Commits

Author SHA1 Message Date
Travis Person
569eeb8f82 Update IPTB test - WIP
Related to #5521

License: MIT
Signed-off-by: Travis Person <travis@protocol.ai>
2018-11-01 19:33:05 -07:00
Jakub Sztandera
a4fab7f885 fix(sharness): gc repo size tests failing
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-10-15 09:26:28 +01:00
Steven Allen
67ea8dde0e test the correct return value
`res=$?` erases `$?` (sets it to 0)

fixes #5577

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-10-10 10:08:54 +01:00
Łukasz Magiera
6fa2ab0d41 coreapi swarm: rewire address listing cmds
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-09-26 22:17:23 +02:00
keks
908ffddc1b big squash commit
excerpt of commit messages:
- update postrun functions in core/commands
- sharness: allow setting -i with TEST_IMMEDIATE=1
- cmds Run func returns error now
- gx update cmdkit to 1.1.2 and cmds to 2.0.0-beta1

License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-09-19 14:35:54 -07:00
Steven Allen
0252710020 remove Godeps
fixes #2722

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-09-11 12:11:24 -07:00
Steven Allen
c1e10dbc4e add correct test for 1515
When checking to see if GC fully reverses an `ipfs add`, we should check the
size of the actual files, not the directory sizes. A bunch of empty directories
won't use *that* much space and really shouldn't count against GC.

closes #1515

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-08-11 09:53:52 -07:00
Steven Allen
abad8ca76e wait for the nodes to fully stop
Ideally, we'd fix this in IPTB but I'm tired of this bug and this is the easy
fix.

fixes #5272

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-30 16:21:25 -07:00
Steven Allen
cb0ad0d6ce fix starting iptb nodes with additional arguments
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-07-06 23:33:12 -07:00
Steven Allen
8f95badb12 cat iptb logs on iptb failure (for debugging CI)
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-03 12:47:52 -07:00
Łukasz Magiera
9b4296d9fd ci: Collect test times for sharness
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-04-21 22:40:03 +02:00
Łukasz Magiera
6b3915ba90 ci: run go vet, disable docker on jenkins
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-04-10 18:31:25 +02:00
Łukasz Magiera
3e41b15906 sharness: Don't escape colors in junit xml
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-04-10 18:31:25 +02:00
Łukasz Magiera
d25e82616e sharness/junit: Better test tree in jenkins
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-04-10 18:31:25 +02:00
Łukasz Magiera
d6fe0c195d ci: New Jenkinsfile
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-04-10 18:31:25 +02:00
Łukasz Magiera
b2b68c8214 sharness/junit: review
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-04-10 18:31:25 +02:00
Łukasz Magiera
3eb614fcb2 sharness: Generate JUnit test reports
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-04-10 18:31:25 +02:00
keks
4b9c36b072 sharness: increase timeout waiting for api file
License: MIT
Signed-off-by: keks <keks@cryptoscope.co>
2018-01-21 11:11:47 -08:00
Steven Allen
af21ae129d politely ask programs to not print ANSI codes by setting TERM to dumb
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-14 08:41:57 -08:00
Kevin Atkinson
2aeaf6309d Always set IPFS_PATH in test-lib.sh
Before it was only set when "test_init_ipfs" is called but that is
not always used, for example in t0025-datastores.sh.

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-12-08 14:12:26 -05:00
Steven Allen
ba680b10da make sure the repo size is greater than the size of the symlink
Before, we'd check to make sure the repo, when checked through a symlink, is at
least as large as the repo *before* we checked it through the symlink. However,
this assumes that the repo can't shrink.

Really, this test exists to ensure we measure the repo size itself instead of
the size of the symlink; this commit changes the test to reflect this.

This test fails when 54d7e03303 is reverted.

fixes #4408

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-01 09:56:03 -08:00
Łukasz Magiera
6a40c37b94 sharness: 2 space indent
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-10-04 13:39:14 +02:00
Łukasz Magiera
fdccfea029 sharness: fix indent in few more places
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-10-04 13:35:07 +02:00
Sherod Taylor
bc75d3b88a Removed tour command and fix test
License: MIT
Signed-off-by: Sherod Taylor <sherodtaylor@gmail.com>
2017-08-09 10:14:57 -04:00
Steven Allen
39197ff8d3 sharness: fix the 'useful error message when adding a named pipe' test
We were removing the file before testing, ignoring the error from stat, and then
grepping for `Error: Unrecognized file type for named-pipe: ` (because nothing
was sent to stdout).

This fix:

1. Changes our stat command to output failed to stdout on failure to ensure that
bugs like this *can't* happen.
2. Checks to make sure stat actually succeeds.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-07-31 18:31:40 -07:00
Steven Allen
0ada88637b sharness: use test profile
This:

* Disables mdns and fixes #4098 (iptb nodes already have mdns disabled by
  default).
* Only listens on localhost (although iptb nodes still listen on all).

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-07-30 20:22:41 -07:00
Jakub Sztandera
b5ea00e6b4
sharness: add debug output for TEST_NO_PLUGIN
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-07-14 13:23:14 +02:00
Jakub Sztandera
285a4d8e10
test: add TEST_NO_PLUGIN and PLUGIN prereq
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-07-12 21:53:59 +02:00
Jakub Sztandera
dab716ba02
test: fix ulimit tests for 2048 fds
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-03-24 20:56:09 +01:00
Jakub Sztandera
e2ececa4fa
test: fix sharness disk_usage util
on bsd based systems du returns block count not bytes

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-03-08 00:07:18 +01:00
Lars Gierth
26770b7ebb
fsrepo: fix musl detection for migrations
The ldd command used for detection doesn't seem to have a
--version flag on Alpine Linux. It would print the expected
output, but instead of stdout, it would print it on stderr.

The musl detection code would only scan stdout for mentions
of "musl", and would thus *not* download the musl version
of the fs-repo-migrations executable.

This manifested in the well-known "fs-repo-migrations: not found"
error, which you get when executing something that was linked
against a different libc than the one present on the system.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-02-17 08:37:26 +01:00
Jakub Sztandera
a2e3aa5d78
make: fix standalone sharness run
The comparison was wrong

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 01:18:40 +01:00
Jakub Sztandera
f630222580
make: rework makefiles for non-recursive make and add sharness coverage
This commit introduces non-recursive Makefile infrastructure that replaces current Makefile infrastructure.
It also generally cleanups the Makefiles, separates them into nicer sub-modules and centralizes common operations into single definitions.

It allows to depend on any target that is defined in the makefile, this means that for example `gx install` is called once when `make build test_expensive_sharness` is called instead of 4 or 5 times.

It also makes the dependencies much cleaner and allows for reuse of modules. For example sharness coverage collection (WIP) uses sharness target with amended PATH, previously it might have been possible but not without wiring in the coverage collection into sharness make runner code.

Yes, it is more complex but not much more. There are few rules that have to be followed and few complexities added but IMHO it is worth it.

How to NR-make:
1. If make is to generate some file via a target, it MUST be defined in Rules.mk file in the directory of the target.
2. `Rules.mk` file MUST have `include mk/header.mk` statement as the first line and `include mk/footer.mk` statement as the last line (apart from project root `Rules.mk`).
3. It then MUST be included by the closest `Rules.mk` file up the directory tree.
4. Inside a `Rules.mk` special variable accessed as `$(d)` is defined. Its value is current directory, use it so if the `Rules.mk` file is moved in the tree it still works without a problem. Caution: this variable is not available in the recipe part and MUST NOT be used. Use name of the target or prerequisite to extract it if you need it.
5. Make has only one global scope, this means that name conflicts are a thing. Names SHOULD  follow `VAR_NAME_$(d)` convention. There are exceptions from this rule in form of well defined global variables. Examples: General lists `TGT_BIN`, `CLEAN`; General targets: `TEST`, `COVERAGE`; General variables: `GOFLAGS`, `DEPS_GO`.
3. Any rules, definitions or variables that fit some family SHOULD be defined in `mk/$family.mk` file and included from project root `Rules.mk`

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-02-12 01:18:40 +01:00
Jan Winkelmann
993e7816f8 pubsub sharness tests after chriscool feedback
License: MIT
Signed-off-by: Jan Winkelmann <j-winkelmann@tuhh.de>
2016-12-04 03:22:51 +01:00
Jan Winkelmann
1b3158f860 add sharness test for pubsub
License: MIT
Signed-off-by: Jan Winkelmann <j-winkelmann@tuhh.de>
2016-12-04 03:22:49 +01:00
Lars Gierth
dae854eaf3 assets: rebuild them
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-11-03 00:38:32 +01:00
Jeromy
3d5e015876 add a test for auto-raising ulimit
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-06-22 11:17:16 -07:00
Jakub Sztandera
bdea10ff0e Make if condition in sharness lib silent
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-05-24 15:59:56 +02:00
Jakub Sztandera
7614f4f700 Create shanress test for offline mode node
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-05-24 15:59:56 +02:00
Christian Couder
c54c0456b7 test-lib: make checking for docker silent
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-05-07 13:14:11 +02:00
Jeromy
63a9ed202c make t0060 use port zero
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-03-02 15:00:04 -08:00
Stephen Whitmore
b66e089ec1 trailing whitespace
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-02-29 16:05:48 -08:00
Christian Couder
00e03404d8 sharness: replace POSIX prereq with STD_ERR_MSG
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-22 22:13:30 +01:00
Christian Couder
ea8d8aaa13 appveyor: use a POSIX prereq
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-12 17:20:23 -08:00
Jeromy
0c7595b65b Use port zero for all ipfs daemon addresses in sharness testing
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 14:04:32 -08:00
Jeromy Johnson
5a0b8023be Merge pull request #2256 from ipfs/feat/gx-libp2p
vendor libp2p with gx
2016-02-05 16:52:02 -08:00
Lars Gierth
c103efc1a9 sharness: disable t0300-docker-image on Circle CI
The actual tests for the IPFS daemon within the image,
which were added in the previous commits, made Circle CI unhappy.

Circle CI runs an old version of Docker
which still uses LXC instead of libcontainer.
The existing lxc-attach hack is testament to that.

We might be able to get it work [1][2]
but it's really not worth it at the moment,
and Circle CI isn't a good option for Docker things, right now.

[1] https://jpetazzo.github.io/2014/03/23/lxc-attach-nsinit-nsenter-docker-0-9/
[2] https://github.com/jpetazzo/nsenter

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-02-05 03:11:50 +01:00
Christian Couder
78f2f10ccf iptb-lib: small improvements
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-04 22:32:49 +01:00
Christian Couder
e0a48ffcf6 iptb-lib: add startup_cluster()
While at it let's cleanup startup_cluster() too.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-01 23:22:35 +01:00
Christian Couder
d1f15d445b iptb-lib: small cleanup
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-02-01 13:23:51 +01:00