1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-20 22:22:50 +08:00

sharness: Fix tests

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
Łukasz Magiera
2017-12-28 20:12:13 +01:00
parent 3eb614fcb2
commit 83c57eda1f
84 changed files with 92 additions and 92 deletions
test/sharness
t0010-basic-commands.sht0015-basic-sh-functions.sht0018-indent.sht0020-init.sht0021-config.sht0022-init-default.sht0023-shutdown.sht0024-datastore-config.sht0025-datastores.sht0030-mount.sht0031-mount-publish.sht0040-add-and-cat.sht0041-ping.sht0042-add-skip.sht0043-add-w.sht0044-add-symlink.sht0045-ls.sht0050-block.sht0051-object.sht0052-object-diff.sht0053-dag.sht0060-daemon.sht0061-daemon-opts.sht0062-daemon-api.sht0063-daemon-init.sht0063-external.sht0065-active-requests.sht0066-migration.sht0070-user-config.sht0080-repo.sht0081-repo-pinning.sht0082-repo-gc-auto.sht0083-repo-fsck.sht0084-repo-read-rehash.sht0085-pins.sht0086-repo-verify.sht0087-repo-robust-gc.sht0088-repo-stat-symlink.sht0090-get.sht0100-name.sht0101-iptb-name.sht0110-gateway.sht0111-gateway-writeable.sht0112-gateway-cors.sht0120-bootstrap.sht0121-bootstrap-iptb.sht0125-twonode.sht0130-multinode.sht0131-multinode-client-routing.sht0140-swarm.sht0141-addfilter.sht0150-clisuggest.sht0151-sysdiag.sht0160-resolve.sht0165-keystore.sht0170-dht.sht0175-reprovider.sht0180-p2p.sht0180-pubsub.sht0181-private-network.sht0182-circuit-relay.sht0183-namesys-pubsub.sht0200-unixfs-ls.sht0210-tar.sht0220-bitswap.sht0230-channel-streaming-http-content-type.sht0231-channel-streaming.sht0235-cli-request.sht0240-republisher.sht0250-files-api.sht0251-files-flushing.sht0252-files-gc.sht0260-sharding.sht0270-filestore.sht0271-filestore-utils.sht0275-cid-security.sht0280-plugin-git.sht0300-docker-image.sht0301-docker-migrate.sht0400-api-security.sht0410-api-add.sht0500-issues-and-regressions-offline.sht0600-issues-and-regressions-online.shx0601-pin-fail-test.sh

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test sharness test indent"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
@ -46,7 +46,7 @@ test_expect_success "ipfs cat fails" '
test_expect_success "ipfs cat no repo message looks good" '
echo "Error: no IPFS repo found in $IPFS_PATH." > cat_fail_exp &&
echo "please run: 'ipfs init'" >> cat_fail_exp &&
echo "please run: '"'"'ipfs init'"'"'" >> cat_fail_exp &&
test_path_cmp cat_fail_exp cat_fail_out
'

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test config command"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2017 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test datastore config"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test non-standard datastores"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test mount command in conjunction with publishing"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test ping command"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Henry Bubert
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Juan Batiz-Benet
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Juan Batiz-Benet
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# MIT Licensed; see the LICENSE file in this repository.
#

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Juan Batiz-Benet
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Brian Holder-Chow Lin On
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# MIT Licensed; see the LICENSE file in this repository.
#

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Mike Pfister
# MIT Licensed; see the LICENSE file in this repository.
@ -23,7 +23,7 @@ repo.lock" '
mkdir -p $IPFS_PATH/datastore &&
touch $IPFS_PATH/datastore/LOCK &&
touch $IPFS_PATH/repo.lock &&
printf "/ip4/127.0.0.1/tcp/5001" > $IPFS_PATH/api &&
printf "/ip4/127.0.0.1/tcp/5001" > "$IPFS_PATH/api" &&
ipfs repo fsck > fsck_out_actual1
'
test_expect_success "'ipfs repo fsck' output looks good with no daemon" '
@ -42,9 +42,9 @@ test_expect_success "'ipfs repo fsck' confirm file deletion" '
# non-zero repo.lock issue
test_expect_success "'ipfs repo fsck' succeeds with no daemon running non-zero
repo.lock" '
mkdir -p $IPFS_PATH &&
printf ":D" > $IPFS_PATH/repo.lock &&
touch $IPFS_PATH/datastore/LOCK &&
mkdir -p "$IPFS_PATH" &&
printf ":D" > "$IPFS_PATH/repo.lock" &&
touch "$IPFS_PATH/datastore/LOCK" &&
ipfs repo fsck > fsck_out_actual1b
'
test_expect_success "'ipfs repo fsck' output looks good with no daemon" '
@ -64,7 +64,7 @@ test_expect_success "'ipfs repo fsck' confirm file deletion" '
# Try with locks api and datastore/LOCK
test_expect_success "'ipfs repo fsck' succeeds partial lock" '
printf "/ip4/127.0.0.1/tcp/5001" > $IPFS_PATH/api &&
printf "/ip4/127.0.0.1/tcp/5001" > "$IPFS_PATH/api" &&
touch $IPFS_PATH/datastore/LOCK &&
ipfs repo fsck > fsck_out_actual2
'
@ -82,7 +82,7 @@ test_expect_success "'ipfs repo fsck' confirm file deletion" '
# Try with locks api and repo.lock
test_expect_success "'ipfs repo fsck' succeeds partial lock" '
printf "/ip4/127.0.0.1/tcp/5001" > $IPFS_PATH/api &&
printf "/ip4/127.0.0.1/tcp/5001" > "$IPFS_PATH/api" &&
touch $IPFS_PATH/repo.lock &&
ipfs repo fsck > fsck_out_actual3
'
@ -154,7 +154,7 @@ test_expect_success "'ipfs repo fsck' confirm file deletion" '
# Try with single lock api
test_expect_success "'ipfs repo fsck' succeeds partial lock" '
printf "/ip4/127.0.0.1/tcp/5001" > $IPFS_PATH/api &&
printf "/ip4/127.0.0.1/tcp/5001" > "$IPFS_PATH/api" &&
ipfs repo fsck > fsck_out_actual7
'

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) Jakub Sztandera
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2017 John Reed
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Matt Bell
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Matt Bell
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Marcin Rataj
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2017 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test ipfs cli cmd suggest"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test resolve command"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2017 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test dht command"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test reprovider"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test experimental p2p commands"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test dht command"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test circuit relay"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Test IPNS pubsub"

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Cayman Nava
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Kevin Atkinson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2017 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2017 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2017 Jakub Sztandera
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2017 Jakub Sztandera
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2015 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2017 Whyrusleeping
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Lars Gierth
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Tom O'Donnell
# MIT Licensed; see the LICENSE file in this repository.

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Tests for various fixed issues and regressions."

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
test_description="Tests for various fixed issues and regressions."

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
#
# Copyright (c) 2016 Jeromy Johnson
# MIT Licensed; see the LICENSE file in this repository.