Skip to content

Commit

Permalink
Fix otlpmetric tests
Browse files Browse the repository at this point in the history
Check pre 1.0 as well
  • Loading branch information
MrAlias committed Apr 27, 2023
1 parent 86bb2e9 commit 483c826
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion exporters/otlp/otlpmetric/internal/header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ import (
)

func TestGetUserAgentHeader(t *testing.T) {
require.Regexp(t, "OTel OTLP Exporter Go/1\\..*", GetUserAgentHeader())
require.Regexp(t, "OTel OTLP Exporter Go/[01]\\..*", GetUserAgentHeader())
}
2 changes: 1 addition & 1 deletion exporters/otlp/otlpmetric/otlpmetricgrpc/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func TestConfig(t *testing.T) {
require.NoError(t, exp.Shutdown(ctx))

got := coll.Headers()
require.Regexp(t, "OTel OTLP Exporter Go/1\\..*", got)
require.Regexp(t, "OTel OTLP Exporter Go/[01]\\..*", got)
require.Contains(t, got, key)
assert.Equal(t, got[key], []string{headers[key]})
})
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlpmetric/otlpmetrichttp/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestConfig(t *testing.T) {
require.NoError(t, exp.Shutdown(ctx))

got := coll.Headers()
require.Regexp(t, "OTel OTLP Exporter Go/1\\..*", got)
require.Regexp(t, "OTel OTLP Exporter Go/[01]\\..*", got)
require.Contains(t, got, key)
assert.Equal(t, got[key], []string{headers[key]})
})
Expand Down

0 comments on commit 483c826

Please sign in to comment.