2018-08-03 14:15:52 +01:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
2018-08-01 13:57:37 +01:00
|
|
|
package overlay
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestRun(t *testing.T) {
|
2018-12-20 13:57:54 +00:00
|
|
|
ctx := context.Background()
|
2018-08-01 13:57:37 +01:00
|
|
|
|
2018-11-16 16:31:14 +00:00
|
|
|
// run with nil, pass pointer to Kademlia in context
|
2018-12-20 13:57:54 +00:00
|
|
|
err := Config{}.Run(ctx, nil)
|
2018-11-16 16:31:14 +00:00
|
|
|
assert.Error(t, err)
|
2018-12-14 20:17:30 +00:00
|
|
|
assert.Equal(t, "overlay error: unable to get master db instance", err.Error())
|
2018-08-01 13:57:37 +01:00
|
|
|
}
|