2017-07-15 21:15:59 +00:00
|
|
|
package agent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"reflect"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
discover "github.com/hashicorp/go-discover"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestGoDiscoverRegistration(t *testing.T) {
|
2017-08-02 15:59:47 +00:00
|
|
|
d := discover.Discover{}
|
|
|
|
got := d.Names()
|
2017-10-31 22:03:54 +00:00
|
|
|
want := []string{"aliyun", "aws", "azure", "digitalocean", "gce", "os", "scaleway", "softlayer"}
|
2017-07-15 21:15:59 +00:00
|
|
|
if !reflect.DeepEqual(got, want) {
|
|
|
|
t.Fatalf("got go-discover providers %v want %v", got, want)
|
|
|
|
}
|
|
|
|
}
|