-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: preload peerlog plugin, disable by default
This preloads the peerlog plugin in the ipfs binary, but keeps it disabled by default. To enabled it, set Enabled=true in its config. The motivation is to simplify building and deploying gateways, and for them to use binaries that are more similar to release bins.
- Loading branch information
Showing
5 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (c) 2017 Jakub Sztandera | ||
# MIT Licensed; see the LICENSE file in this repository. | ||
# | ||
|
||
test_description="Test peerlog plugin" | ||
|
||
. lib/test-lib.sh | ||
|
||
test_expect_success "setup testbed" ' | ||
iptb testbed create -type localipfs -count 2 -force -init | ||
' | ||
|
||
startup_cluster 2 | ||
|
||
test_expect_success "peerlog is disabled by default" ' | ||
go-sleep 100ms | ||
iptb logs 0 >node0logs | ||
test_expect_code 1 grep peerlog node0logs | ||
' | ||
|
||
test_expect_success 'stop iptb' 'iptb stop' | ||
|
||
|
||
|
||
test_expect_success "setup testbed" ' | ||
iptb testbed create -type localipfs -count 2 -force -init | ||
' | ||
|
||
test_expect_success "enable peerlog config setting" ' | ||
iptb run -- ipfs config --json Plugins.Plugins.peerlog.Config.Enabled true | ||
' | ||
|
||
startup_cluster 2 | ||
|
||
test_expect_success "peerlog plugin is logged" ' | ||
go-sleep 100ms | ||
iptb logs 0 >node0logs | ||
grep peerlog node0logs | ||
' | ||
|
||
test_expect_success 'peer id' ' | ||
PEERID_1=$(iptb attr get 1 id) | ||
' | ||
|
||
test_expect_success "peer id is logged" ' | ||
iptb logs 0 | grep -q "$PEERID_1" | ||
' | ||
|
||
test_expect_success 'stop iptb' 'iptb stop' | ||
|
||
test_done |