File tree 2 files changed +24
-6
lines changed
2 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,12 @@ Inverse profile of the test profile.`,
86
86
Transform : func (c * Config ) error {
87
87
c .Addresses = addressesConfig ()
88
88
89
+ bootstrapPeers , err := DefaultBootstrapPeers ()
90
+ if err != nil {
91
+ return err
92
+ }
93
+ c .Bootstrap = appendSingle (c .Bootstrap , BootstrapPeerStrings (bootstrapPeers ))
94
+
89
95
c .Swarm .DisableNatPortMap = false
90
96
c .Discovery .MDNS .Enabled = true
91
97
return nil
@@ -156,14 +162,21 @@ fetching may be degraded.
156
162
}
157
163
158
164
func appendSingle (a []string , b []string ) []string {
159
- m := map [string ]struct {}{}
165
+ out := make ([]string , 0 , len (a )+ len (b ))
166
+ m := map [string ]bool {}
160
167
for _ , f := range a {
161
- m [f ] = struct {}{}
168
+ if ! m [f ] {
169
+ out = append (out , f )
170
+ }
171
+ m [f ] = true
162
172
}
163
173
for _ , f := range b {
164
- m [f ] = struct {}{}
174
+ if ! m [f ] {
175
+ out = append (out , f )
176
+ }
177
+ m [f ] = true
165
178
}
166
- return mapKeys ( m )
179
+ return out
167
180
}
168
181
169
182
func deleteEntries (arr []string , del []string ) []string {
Original file line number Diff line number Diff line change @@ -212,8 +212,13 @@ test_config_cmd() {
212
212
213
213
test_profile_apply_revert server local-discovery
214
214
215
- # won't work as we already have this profile applied
216
- # test_profile_apply_revert test
215
+ # tests above mess with values this profile changes, need to do that before testing test profile
216
+ test_expect_success " ensure test profile is applied fully" '
217
+ ipfs config profile apply test
218
+ '
219
+
220
+ # need to do this in reverse as the test profile is already applied in sharness
221
+ test_profile_apply_revert default-networking test
217
222
218
223
# won't work as it changes datastore definition, which makes ipfs not launch
219
224
# without converting first
You can’t perform that action at this time.
0 commit comments