github.com/kjdelisle/consul@v1.4.5/agent/retry_join_test.go (about)

     1  package agent
     2  
     3  import (
     4  	"reflect"
     5  	"testing"
     6  
     7  	discover "github.com/hashicorp/go-discover"
     8  )
     9  
    10  func TestGoDiscoverRegistration(t *testing.T) {
    11  	d, err := discover.New()
    12  	if err != nil {
    13  		t.Fatal(err)
    14  	}
    15  	got := d.Names()
    16  	want := []string{"aliyun", "aws", "azure", "digitalocean", "gce", "os", "packet", "scaleway", "softlayer", "triton", "vsphere"}
    17  	if !reflect.DeepEqual(got, want) {
    18  		t.Fatalf("got go-discover providers %v want %v", got, want)
    19  	}
    20  }