Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgyucht committed May 17, 2024
1 parent ceac218 commit d19ee8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions useragent/user_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ func TestFromContext_Custom(t *testing.T) {
userAgent2 := FromContext(ctx2)

// tests may be developed and run on different versions of different things
expectedFormat := "unit-tests/0.0.1 databricks-sdk-go/%s go/%s os/%s pulumi/3.8.4 terraform/1.3.6 a/e"
expectedFormat := "unit-tests/0.0.1 databricks-sdk-go/%s go/%s os/%s pulumi/3.8.4 terraform/1.3.4 terraform/1.3.5 terraform/1.3.6 a/b a/d a/e"
expected := fmt.Sprintf(expectedFormat, version.Version, goVersion(), runtime.GOOS)
assert.Equal(t, expected, userAgent)

expectedFormat2 := "unit-tests/0.0.1 databricks-sdk-go/%s go/%s os/%s pulumi/3.8.4 terraform/1.3.6 a/f foo/bar"
expectedFormat2 := "unit-tests/0.0.1 databricks-sdk-go/%s go/%s os/%s pulumi/3.8.4 terraform/1.3.4 terraform/1.3.5 terraform/1.3.6 a/b a/d a/e a/f foo/bar"
expected2 := fmt.Sprintf(expectedFormat2, version.Version, goVersion(), runtime.GOOS)
assert.Equal(t, expected2, userAgent2)

Expand Down Expand Up @@ -81,4 +81,4 @@ func TestMultiplePartners(t *testing.T) {
userAgent := FromContext(context.Background())
assert.Contains(t, userAgent, "partner/partner1")
assert.Contains(t, userAgent, "partner/partner2")
}
}

0 comments on commit d19ee8c

Please sign in to comment.