2017-07-15 14:15:59 -07:00
|
|
|
package agent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"reflect"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
discover "github.com/hashicorp/go-discover"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestGoDiscoverRegistration(t *testing.T) {
|
2018-05-04 12:11:12 -07:00
|
|
|
d, err := discover.New()
|
|
|
|
if err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
2017-08-02 17:59:47 +02:00
|
|
|
got := d.Names()
|
2018-05-10 16:04:40 -07:00
|
|
|
want := []string{"aliyun", "aws", "azure", "digitalocean", "gce", "os", "scaleway", "softlayer", "triton"}
|
2017-07-15 14:15:59 -07:00
|
|
|
if !reflect.DeepEqual(got, want) {
|
|
|
|
t.Fatalf("got go-discover providers %v want %v", got, want)
|
|
|
|
}
|
|
|
|
}
|