1
0
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:
Remy Chantenay 2023-04-14 16:41:27 +02:00 committed by GitHub
parent 37388599eb
commit cf8367f711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}