[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

@@ -27,7 +27,7 @@ func TestMain(m *testing.M) {
os.Exit(1)
}
c, err := resourcegroups.NewClient(testAuth)
c, err := resourcegroups.NewClient(testAuth, "unit-test")
if err != nil {
os.Exit(1)
}
@@ -68,7 +68,7 @@ func newTestClient(t *testing.T) *Client {
if err := setupAuth(); err != nil {
t.Fatal(err)
}
c, err := NewClient(testAuth)
c, err := NewClient(testAuth, "unit-test")
if err != nil {
t.Fatal(err)
}