Skip to content

Commit

Permalink
Migrate integration testing redis Dockefiles from TestUtils to github…
Browse files Browse the repository at this point in the history
… services
  • Loading branch information
jvoravong committed Mar 20, 2024
1 parent 29c1001 commit e54709f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/integration-test.yml
Expand Up @@ -215,6 +215,12 @@ jobs:
image: quay.io/splunko11ytest/postgres:latest
ports:
- "15432:5432"
redis_client:
image: jvsplk/redis_client:latest
redis_server:
image: jvsplk/redis_server:latest
ports:
- "6379:6379"
strategy:
matrix:
ARCH: [ "amd64", "arm64" ]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions tests/receivers/redis/redisreceiver_test.go
Expand Up @@ -17,21 +17,15 @@
package tests

import (
"path"
"testing"

"github.com/signalfx/splunk-otel-collector/tests/testutils"
)

func TestRedisReceiverProvidesAllMetrics(t *testing.T) {
server := testutils.NewContainer().WithContext(path.Join(".", "testdata", "server")).WithExposedPorts("6379:6379").WithName("redis-server").WillWaitForPorts("6379").WillWaitForLogs("Ready to accept connections")
containers := []testutils.Container{server}
testutils.AssertAllMetricsReceived(t, "all.yaml", "all_metrics_config.yaml", containers, nil)
}

func TestRedisReceiverProvidesAllMetricsWithServer(t *testing.T) {
server := testutils.NewContainer().WithContext(path.Join(".", "testdata", "server")).WithExposedPorts("6379:6379").WithNetworks("redis_network").WithName("redis-server").WillWaitForLogs("Ready to accept connections")
client := testutils.NewContainer().WithContext(path.Join(".", "testdata", "client")).WithName("redis-client").WithNetworks("redis_network").WillWaitForLogs("redis client started")
containers := []testutils.Container{server, client}
testutils.AssertAllMetricsReceived(t, "all_server.yaml", "all_metrics_config.yaml", containers, nil)
}

0 comments on commit e54709f

Please sign in to comment.