Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
d4b42f8e
Commit
d4b42f8e
authored
Nov 15, 2015
by
Jeromy
Browse files
fixes for sha3
parent
8f79df77
Changes
127
Show whitespace changes
Inline
Side-by-side
vendor/QmdsKjp5fcCT8PZ8JBMcdFsCbbmKwSLCU5xXbsnwb5DMxy/go-multihash/test/sharness/lib/test-aggregate-results.sh
0 → 100644
View file @
d4b42f8e
#!/bin/sh
#
# Script to aggregate results using Sharness
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#
SHARNESS_AGGREGATE
=
"lib/sharness/aggregate-results.sh"
test
-f
"
$SHARNESS_AGGREGATE
"
||
{
echo
>
&2
"Cannot find:
$SHARNESS_AGGREGATE
"
echo
>
&2
"Please check Sharness installation."
exit
1
}
ls
test-results/t
*
-
*
.sh.
*
.counts |
"
$SHARNESS_AGGREGATE
"
vendor/QmdsKjp5fcCT8PZ8JBMcdFsCbbmKwSLCU5xXbsnwb5DMxy/go-multihash/test/sharness/lib/test-lib.sh
0 → 100644
View file @
d4b42f8e
# Test framework for go-ipfs
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#
# We are using sharness (https://github.com/mlafeldt/sharness)
# which was extracted from the Git test framework.
# Use the multihash tool to test against
# Add current directory to path, for multihash tool.
PATH
=
$(
pwd
)
/bin:
${
PATH
}
# Set sharness verbosity. we set the env var directly as
# it's too late to pass in --verbose, and --verbose is harder
# to pass through in some cases.
test
"
$TEST_VERBOSE
"
=
1
&&
verbose
=
t
# assert the `multihash` we're using is the right one.
if
test
`
which multihash
`
!=
$(
pwd
)
/bin/multihash
;
then
echo
>
&2
"Cannot find the tests' local multihash tool."
echo
>
&2
"Please check test and multihash tool installation."
exit
1
fi
SHARNESS_LIB
=
"lib/sharness/sharness.sh"
.
"
$SHARNESS_LIB
"
||
{
echo
>
&2
"Cannot source:
$SHARNESS_LIB
"
echo
>
&2
"Please check Sharness installation."
exit
1
}
# Please put go-multihash specific shell functions below
for
hashbin
in
sha1sum
shasum
;
do
if
type
"
$hashbin
"
;
then
export
SHASUMBIN
=
"
$hashbin
"
&&
test_set_prereq SHASUM
&&
break
fi
done
vendor/QmdsKjp5fcCT8PZ8JBMcdFsCbbmKwSLCU5xXbsnwb5DMxy/go-multihash/test/sharness/t0010-basics.sh
0 → 100644
View file @
d4b42f8e
#!/bin/sh
#
# Copyright (c) 2015 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#
test_description
=
"Basic tests"
.
lib/test-lib.sh
test_expect_success
"current dir is writable"
'
echo "It works!" >test.txt
'
test_expect_success
"multihash is available"
'
type multihash
'
test_expect_success
"multihash help output looks good"
'
test_must_fail multihash -h 2>help.txt &&
cat help.txt | egrep -i "^usage:" >/dev/null &&
cat help.txt | egrep -i "multihash .*options.*file" >/dev/null
'
test_done
vendor/QmdsKjp5fcCT8PZ8JBMcdFsCbbmKwSLCU5xXbsnwb5DMxy/go-multihash/test/sharness/t0020-sha1.sh
0 → 100644
View file @
d4b42f8e
#!/bin/sh
#
# Copyright (c) 2015 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#
test_description
=
"sha1 tests"
.
lib/test-lib.sh
test_expect_success
"setup sha1 tests"
'
echo "Hash me!" >hash_me.txt &&
SHA1=bc6f2c3cd945bc754789e50b2f68deee2f421810 &&
echo "1114$SHA1" >actual
'
test_expect_success
"'multihash -a=sha1 -e=hex' works"
'
multihash -a=sha1 -e=hex hash_me.txt >expected
'
test_expect_success
"'multihash -a=sha1 -e=hex' output looks good"
'
test_cmp expected actual
'
test_expect_success SHASUM
"check hash using shasum"
'
echo "$SHA1 hash_me.txt" >actual &&
$SHASUMBIN hash_me.txt >expected &&
test_cmp expected actual
'
test_done
vendor/util/eventlog/loggables/loggables.go
View file @
d4b42f8e
...
...
@@ -9,7 +9,7 @@ package loggables
import
(
"net"
ma
"Qm
aA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF
/go-multiaddr"
ma
"Qm
bWxL1aXQhBjc1XGjGF1f2KGBMCBYSuT2ThA8YXnXJK83
/go-multiaddr"
logging
"QmWRypnfEwrgH4k93KEHN5hng7VjKYkWmzDYRuTZeh2Mgh/go-log"
...
...
vendor/util/testutil/gen.go
View file @
d4b42f8e
...
...
@@ -12,7 +12,7 @@ import (
peer
"github.com/ipfs/go-libp2p/p2p/peer"
u
"util"
ma
"Qm
aA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF
/go-multiaddr"
ma
"Qm
bWxL1aXQhBjc1XGjGF1f2KGBMCBYSuT2ThA8YXnXJK83
/go-multiaddr"
)
// ZeroLocalTCPAddress is the "zero" tcp local multiaddr. This means:
...
...
vendor/util/testutil/identity.go
View file @
d4b42f8e
...
...
@@ -3,7 +3,7 @@ package testutil
import
(
"testing"
ma
"Qm
aA6aDzeHjZiuqBtgYRz8ZXb1qMCoyMHgyDjBEYQniUKF
/go-multiaddr"
ma
"Qm
bWxL1aXQhBjc1XGjGF1f2KGBMCBYSuT2ThA8YXnXJK83
/go-multiaddr"
ci
"github.com/ipfs/go-libp2p/p2p/crypto"
peer
"github.com/ipfs/go-libp2p/p2p/peer"
)
...
...
Prev
1
…
3
4
5
6
7
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment