mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2024-11-28 08:38:51 +02:00
Fix Version test in otel/sdk (#3994)
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
parent
37388599eb
commit
cf8367f711
@ -20,7 +20,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/sdk"
|
||||
)
|
||||
|
||||
// regex taken from https://github.com/Masterminds/semver/tree/v3.1.1
|
||||
@ -29,6 +29,6 @@ var versionRegex = regexp.MustCompile(`^v?([0-9]+)(\.[0-9]+)?(\.[0-9]+)?` +
|
||||
`(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?$`)
|
||||
|
||||
func TestVersionSemver(t *testing.T) {
|
||||
v := otel.Version()
|
||||
v := sdk.Version()
|
||||
assert.NotNil(t, versionRegex.FindStringSubmatch(v), "version is not semver: %s", v)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user