Skip to content

Commit bf0a555

Browse files
denglimingMrAlias
andauthored
Use IntegrationShouldRun in gomemcache_test (#254)
* Use IntegrationShouldRun in gomemcache_test * Update CHANGELOG.md Co-authored-by: Tyler Yahn <[email protected]>
1 parent 0171bec commit bf0a555

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1818
- Remove service name as a parameter of Sarama instrumentation. (#221)
1919
- Replace `WithTracer` with `WithTracerProvider` in Sarama instrumentation. (#221)
2020
- Switch to use common top-level module `SemVersion()` when creating versioned tracer in `bradfitz/gomemcache`. (#226)
21+
- Use `IntegrationShouldRun` in `gomemcache_test`. (#254)
2122

2223
### Fixed
2324

instrumentation/github.com/bradfitz/gomemcache/gomemcache_test.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
package gomemcache
1616

1717
import (
18-
"fmt"
1918
"os"
2019
"testing"
2120

2221
mocktracer "go.opentelemetry.io/contrib/internal/trace"
22+
"go.opentelemetry.io/contrib/internal/util"
2323
"go.opentelemetry.io/otel/api/kv"
2424
"go.opentelemetry.io/otel/api/standard"
2525
oteltrace "go.opentelemetry.io/otel/api/trace"
@@ -31,11 +31,7 @@ import (
3131
)
3232

3333
func TestMain(m *testing.M) {
34-
_, ok := os.LookupEnv("INTEGRATION")
35-
if !ok {
36-
fmt.Println("--- SKIP: to enable integration test, set the INTEGRATION environment variable")
37-
os.Exit(0)
38-
}
34+
util.IntegrationShouldRun("test-gomemcache")
3935
os.Exit(m.Run())
4036
}
4137

0 commit comments

Comments
 (0)