Skip to content

Commit

Permalink
fix: most of sharness tests that require non-empty dir
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias committed Mar 28, 2023
1 parent 4069a2b commit 1f1a755
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions test/sharness/lib/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@ test_config_set() {
}

test_init_ipfs() {

args=("$@")

# we set the Addresses.API config variable.
# the cli client knows to use it, so only need to set.
# todo: in the future, use env?

test_expect_success "ipfs init succeeds" '
export IPFS_PATH="$(pwd)/.ipfs" &&
ipfs init --profile=test > /dev/null
ipfs init "${args[@]}" --profile=test > /dev/null
'

test_expect_success "prepare config -- mounting" '
Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0054-dag-car-import-export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ test_expect_success "shut down nodes" '


# We want to just init the repo, without using a daemon for stuff below
test_init_ipfs
test_init_ipfs --empty-repo=false


test_expect_success "basic offline export of 'getting started' dag works" '
Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0080-repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test_description="Test ipfs repo operations"

. lib/test-lib.sh

test_init_ipfs
test_init_ipfs --empty-repo=false
test_launch_ipfs_daemon_without_network

test_expect_success "'ipfs repo gc' succeeds" '
Expand Down
10 changes: 5 additions & 5 deletions test/sharness/t0100-name.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ test_name_with_self() {
export IPFS_PATH="$(pwd)/.ipfs" &&
case $SELF_ALG in
default)
ipfs init --profile=test > /dev/null
ipfs init --empty-repo=false --profile=test > /dev/null
;;
rsa)
ipfs init --profile=test -a=rsa > /dev/null
ipfs init --empty-repo=false --profile=test -a=rsa > /dev/null
;;
ed25519)
ipfs init --profile=test -a=ed25519 > /dev/null
ipfs init --empty-repo=false --profile=test -a=ed25519 > /dev/null
;;
esac &&
export PEERID=`ipfs key list --ipns-base=base36 -l | grep self | cut -d " " -f1` &&
Expand Down Expand Up @@ -273,7 +273,7 @@ test_name_with_key() {

test_expect_success "ipfs init (key variant $GEN_ALG)" '
export IPFS_PATH="$(pwd)/.ipfs" &&
ipfs init --profile=test > /dev/null
ipfs init --empty-repo=false --profile=test > /dev/null
'

test_expect_success "'prepare keys" '
Expand Down Expand Up @@ -317,7 +317,7 @@ test_name_with_key 'ed25519_b36'

# `ipfs name inspect --verify` using the wrong RSA key should not succeed

test_init_ipfs
test_init_ipfs --empty-repo=false
test_launch_ipfs_daemon

test_expect_success "prepare RSA keys" '
Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0600-issues-and-regressions-online.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test_description="Tests for various fixed issues and regressions."

. lib/test-lib.sh

test_init_ipfs
test_init_ipfs --empty-repo=false

test_launch_ipfs_daemon

Expand Down

0 comments on commit 1f1a755

Please sign in to comment.