mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 19:07:48 +08:00
Register iptb plugin once
This commit was moved from ipfs/go-ipfs-http-client@d6c8cbd5e6
This commit is contained in:
parent
0813d808b5
commit
abc30e384f
@ -19,9 +19,7 @@ import (
|
||||
"github.com/ipfs/iptb/testbed/interfaces"
|
||||
)
|
||||
|
||||
type NodeProvider struct{}
|
||||
|
||||
func (NodeProvider) MakeAPISwarm(ctx context.Context, fullIdentity bool, n int) ([]iface.CoreAPI, error) {
|
||||
func init() {
|
||||
_, err := testbed.RegisterPlugin(testbed.IptbPlugin{
|
||||
From: "<builtin>",
|
||||
NewNode: local.NewNode,
|
||||
@ -31,8 +29,13 @@ func (NodeProvider) MakeAPISwarm(ctx context.Context, fullIdentity bool, n int)
|
||||
BuiltIn: true,
|
||||
}, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
type NodeProvider struct{}
|
||||
|
||||
func (NodeProvider) MakeAPISwarm(ctx context.Context, fullIdentity bool, n int) ([]iface.CoreAPI, error) {
|
||||
|
||||
dir, err := ioutil.TempDir("", "httpapi-tb-")
|
||||
if err != nil {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user