gofmt the project files (#205)
This commit is contained in:
@@ -6,9 +6,9 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/google/uuid"
|
||||
azure "github.com/virtual-kubelet/virtual-kubelet/providers/azure/client"
|
||||
"github.com/virtual-kubelet/virtual-kubelet/providers/azure/client/resourcegroups"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -72,9 +72,9 @@ func TestMain(m *testing.M) {
|
||||
|
||||
func TestNewClient(t *testing.T) {
|
||||
auth, err := azure.NewAuthenticationFromFile("../../../../credentials.json")
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to load Azure authentication file: %v", err)
|
||||
}
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to load Azure authentication file: %v", err)
|
||||
}
|
||||
|
||||
c, err := NewClient(auth)
|
||||
if err != nil {
|
||||
|
||||
@@ -29,33 +29,33 @@ type Authentication struct {
|
||||
// credentials.
|
||||
func NewAuthentication(azureCloud, clientID, clientSecret, subscriptionID, tenantID string) *Authentication {
|
||||
environment := PublicCloud
|
||||
|
||||
|
||||
switch azureCloud {
|
||||
case PublicCloud.Name:
|
||||
environment = PublicCloud
|
||||
break;
|
||||
break
|
||||
case USGovernmentCloud.Name:
|
||||
environment = USGovernmentCloud
|
||||
break;
|
||||
break
|
||||
case ChinaCloud.Name:
|
||||
environment = ChinaCloud
|
||||
break;
|
||||
break
|
||||
case GermanCloud.Name:
|
||||
environment = GermanCloud
|
||||
break;
|
||||
break
|
||||
}
|
||||
|
||||
return &Authentication{
|
||||
ClientID: clientID,
|
||||
ClientSecret: clientSecret,
|
||||
SubscriptionID: subscriptionID,
|
||||
TenantID: tenantID,
|
||||
ActiveDirectoryEndpoint: environment.ActiveDirectoryEndpoint,
|
||||
ResourceManagerEndpoint: environment.ResourceManagerEndpoint,
|
||||
GraphResourceID: environment.GraphEndpoint,
|
||||
SQLManagementEndpoint: environment.SQLDatabaseDNSSuffix,
|
||||
GalleryEndpoint: environment.GalleryEndpoint,
|
||||
ManagementEndpoint: environment.ServiceManagementEndpoint,
|
||||
ClientID: clientID,
|
||||
ClientSecret: clientSecret,
|
||||
SubscriptionID: subscriptionID,
|
||||
TenantID: tenantID,
|
||||
ActiveDirectoryEndpoint: environment.ActiveDirectoryEndpoint,
|
||||
ResourceManagerEndpoint: environment.ResourceManagerEndpoint,
|
||||
GraphResourceID: environment.GraphEndpoint,
|
||||
SQLManagementEndpoint: environment.SQLDatabaseDNSSuffix,
|
||||
GalleryEndpoint: environment.GalleryEndpoint,
|
||||
ManagementEndpoint: environment.ServiceManagementEndpoint,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user