@@ -58,9 +58,9 @@ test_launch_ipfs_daemon
58
58
59
59
test_expect_success ' Addresses.Announce affects addresses' '
60
60
ipfs swarm addrs local >actual &&
61
- grep "/ip4/1.2.3.4/tcp/1234" actual &&
61
+ test_should_contain "/ip4/1.2.3.4/tcp/1234" actual &&
62
62
ipfs id -f"<addrs>" | xargs -n1 echo >actual &&
63
- grep "/ip4/1.2.3.4/tcp/1234" actual
63
+ test_should_contain "/ip4/1.2.3.4/tcp/1234" actual
64
64
'
65
65
66
66
test_kill_ipfs_daemon
@@ -81,18 +81,18 @@ test_launch_ipfs_daemon
81
81
82
82
test_expect_success ' Addresses.AppendAnnounce is applied on top of Announce' '
83
83
ipfs swarm addrs local >actual &&
84
- grep "/ip4/1.2.3.4/tcp/1234" actual &&
85
- grep "/dnsaddr/dynamic.example.com" actual &&
86
- grep "/ip4/10.20.30.40/tcp/4321" actual &&
84
+ test_should_contain "/ip4/1.2.3.4/tcp/1234" actual &&
85
+ test_should_contain "/dnsaddr/dynamic.example.com" actual &&
86
+ test_should_contain "/ip4/10.20.30.40/tcp/4321" actual &&
87
87
ipfs id -f"<addrs>" | xargs -n1 echo | tee actual &&
88
- grep "/ip4/1.2.3.4/tcp/1234/p2p" actual &&
89
- grep "/dnsaddr/dynamic.example.com/p2p/" actual &&
90
- grep "/ip4/10.20.30.40/tcp/4321/p2p/" actual
88
+ test_should_contain "/ip4/1.2.3.4/tcp/1234/p2p" actual &&
89
+ test_should_contain "/dnsaddr/dynamic.example.com/p2p/" actual &&
90
+ test_should_contain "/ip4/10.20.30.40/tcp/4321/p2p/" actual
91
91
'
92
92
93
93
test_kill_ipfs_daemon
94
94
95
- noAnnounceCfg=' ["/ip4/1.2.3.4/tcp/1234"]'
95
+ noAnnounceCfg=' ["/ip4/1.2.3.4/tcp/1234", "/ip4/10.20.30.40/tcp/4321" ]'
96
96
test_expect_success " test_config_set succeeds" "
97
97
ipfs config --json Addresses.NoAnnounce '$noAnnounceCfg '
98
98
"
@@ -101,11 +101,11 @@ test_launch_ipfs_daemon
101
101
102
102
test_expect_success " Addresses.NoAnnounce affects addresses from Announce and AppendAnnounce" '
103
103
ipfs swarm addrs local >actual &&
104
- grep -v "/ip4/1.2.3.4/tcp/1234" actual &&
105
- grep -v "/ip4/10.20.30.40/tcp/4321" actual &&
104
+ test_should_not_contain "/ip4/1.2.3.4/tcp/1234" actual &&
105
+ test_should_not_contain "/ip4/10.20.30.40/tcp/4321" actual &&
106
106
ipfs id -f"<addrs>" | xargs -n1 echo >actual &&
107
- grep -v "/ip4/1.2.3.4/tcp/1234" actual &&
108
- grep -v "/ /ip4/10.20.30.40/tcp/4321" actual
107
+ test_should_not_contain "/ip4/1.2.3.4/tcp/1234" actual &&
108
+ test_should_not_contain " /ip4/10.20.30.40/tcp/4321" actual
109
109
'
110
110
111
111
test_kill_ipfs_daemon
@@ -119,9 +119,9 @@ test_launch_ipfs_daemon
119
119
120
120
test_expect_success " Addresses.NoAnnounce with /ipcidr affects addresses" '
121
121
ipfs swarm addrs local >actual &&
122
- grep -v "/ip4/1.2.3.4/tcp/1234" actual &&
122
+ test_should_not_contain "/ip4/1.2.3.4/tcp/1234" actual &&
123
123
ipfs id -f"<addrs>" | xargs -n1 echo >actual &&
124
- grep -v "/ip4/1.2.3.4/tcp/1234" actual
124
+ test_should_not_contain "/ip4/1.2.3.4/tcp/1234" actual
125
125
'
126
126
127
127
test_kill_ipfs_daemon
0 commit comments