Permalink
Browse files

Remove leading "v" from user-agent string

  • Loading branch information...
1 parent bcb9fc0 commit b134f4c04c1a6f5684242dbdb071884ba2e3a993 @jamiehannaford jamiehannaford committed Apr 7, 2015
Showing with 6 additions and 6 deletions.
  1. +1 −1 provider_client.go
  2. +5 −5 provider_client_test.go
View
@@ -11,7 +11,7 @@ import (
)
// DefaultUserAgent is the default User-Agent string set in the request header.
-const DefaultUserAgent = "gophercloud/v1.0"
+const DefaultUserAgent = "gophercloud/1.0.0"
// UserAgent represents a User-Agent header.
type UserAgent struct {
@@ -18,18 +18,18 @@ func TestAuthenticatedHeaders(t *testing.T) {
func TestUserAgent(t *testing.T) {
p := &ProviderClient{}
- p.UserAgent.Prepend("custom-user-agent/v2.4")
- expected := "custom-user-agent/v2.4 gophercloud/v1.0"
+ p.UserAgent.Prepend("custom-user-agent/2.4.0")
+ expected := "custom-user-agent/2.4.0 gophercloud/1.0.0"
actual := p.UserAgent.Join()
th.CheckEquals(t, expected, actual)
- p.UserAgent.Prepend("another-custom-user-agent/v0.3", "a-third-ua/v5.9")
- expected = "another-custom-user-agent/v0.3 a-third-ua/v5.9 custom-user-agent/v2.4 gophercloud/v1.0"
+ p.UserAgent.Prepend("another-custom-user-agent/0.3.0", "a-third-ua/5.9.0")
+ expected = "another-custom-user-agent/0.3.0 a-third-ua/5.9.0 custom-user-agent/2.4.0 gophercloud/1.0.0"
actual = p.UserAgent.Join()
th.CheckEquals(t, expected, actual)
p.UserAgent = UserAgent{}
- expected = "gophercloud/v1.0"
+ expected = "gophercloud/1.0.0"
actual = p.UserAgent.Join()
th.CheckEquals(t, expected, actual)
}

0 comments on commit b134f4c

Please sign in to comment.