Skip to content

Commit

Permalink
Change type of sendEvents in endtoend test from *testing.T to testing…
Browse files Browse the repository at this point in the history
….TB (open-telemetry#2361)

* Change type of sendEvents in endtoend test from *testing.T to testing.TB

* vet integration tests

Co-authored-by: Ryan Fitzpatrick <[email protected]>
  • Loading branch information
hughesjj and rmfitzpatrick authored Dec 15, 2022
1 parent 3b9164c commit fe9e79c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ for-all:

.PHONY: integration-vet
integration-vet:
cd tests && go vet ./...
cd tests && go vet -tags integration,endtoend ./...

.PHONY: integration-test
integration-test:
integration-test: integration-vet
@set -e; cd tests && $(GOTEST_SERIAL) $(BUILD_INFO_TESTS) --tags=integration -v -timeout 5m -count 1 ./...

.PHONY: end-to-end-test
Expand Down
6 changes: 3 additions & 3 deletions tests/endtoend/authscope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func TestIngestAuthScopeTokenGrantsRequiredEventCapabilities(tt *testing.T) {
fmt.Println("sleeping 10s before sending event to Collector to allow computation to begin")
time.Sleep(10 * time.Second)

sendEvents(tc.T, eventType)
sendEvents(tc.TB, eventType)

done := make(chan struct{})
go func() {
Expand Down Expand Up @@ -250,7 +250,7 @@ func TestAPIAuthScopeTokenDoesntGrantRequiredEventCapabilities(t *testing.T) {
fmt.Println("sleeping 10s before sending event to Collector to allow computation to begin")
time.Sleep(10 * time.Second)

sendEvents(tc.T, eventType)
sendEvents(tc.TB, eventType)

done := make(chan struct{})
go func() {
Expand Down Expand Up @@ -335,7 +335,7 @@ func assertQueryIdDimensionsWithQueryProperties(tc *testutils.Testcase, sfxClien
}
}

func sendEvents(t *testing.T, eventType string) {
func sendEvents(t testing.TB, eventType string) {
dim := sfxpb.Dimension{Key: "dim_one", Value: "val_one"}
propVal := "a test event"
description := sfxpb.Property{Key: "description", Value: &sfxpb.PropertyValue{StrValue: &propVal}}
Expand Down
3 changes: 2 additions & 1 deletion tests/general/discoverymode/host_observer_discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ func TestHostObserver(t *testing.T) {
)
defer shutdown()

ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
sc, r, err := cc.Container.Exec(ctx, []string{
// no config server to prevent port collisions
"bash", "-c", "SPLUNK_DEBUG_CONFIG_SERVER=false /otelcol --configd --config-dir /opt/internal-prometheus-config.d &",
Expand Down

0 comments on commit fe9e79c

Please sign in to comment.