mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 17:36:38 +08:00
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.
This commit is contained in:
@ -136,6 +136,7 @@ test_init_ipfs() {
|
||||
# Using RANDOM like this is clearly wrong-- it samples with replacement
|
||||
# and it doesnt even check the port is unused. this is a trivial stop gap
|
||||
# until the proper solution is implemented.
|
||||
RANDOM=$$
|
||||
PORT_API=$((RANDOM % 3000 + 5100))
|
||||
ADDR_API="/ip4/127.0.0.1/tcp/$PORT_API"
|
||||
|
||||
|
Reference in New Issue
Block a user