[ACI] Support to add extra user agent to the request (#378)

* Add UserAgent

* Change to join the user agent with a whitespace and set in the header

* Remove empty entry from user agent
This commit is contained in:
Robbie Zhang
2018-10-18 14:28:43 -07:00
committed by GitHub
parent 0dbc88826c
commit 5991b29f76
8 changed files with 49 additions and 24 deletions

View File

@@ -39,7 +39,7 @@ func TestMain(m *testing.M) {
subscriptionID = auth.SubscriptionID
// Check if the resource group exists and create it if not.
rgCli, err := resourcegroups.NewClient(auth)
rgCli, err := resourcegroups.NewClient(auth, "unit-test")
if err != nil {
log.Fatalf("creating new resourcegroups client failed: %v", err)
}
@@ -82,7 +82,7 @@ func TestNewClient(t *testing.T) {
log.Fatalf("Failed to load Azure authentication file: %v", err)
}
c, err := NewClient(auth)
c, err := NewClient(auth, "unit-test")
if err != nil {
t.Fatal(err)
}