Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move oracle to quay #4509

Merged
merged 1 commit into from Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/integration-test.yml
Expand Up @@ -211,6 +211,10 @@ jobs:
image: quay.io/splunko11ytest/kong:latest
ports:
- "18001:8001"
oracle:
image: quay.io/splunko11ytest/oracle:latest
ports:
- "1521:1521"
postgres:
image: quay.io/splunko11ytest/postgres:latest
ports:
Expand Down
3 changes: 1 addition & 2 deletions tests/receivers/oracledb/bundled_test.go
Expand Up @@ -25,14 +25,13 @@ import (
)

func TestOracledbDockerObserver(t *testing.T) {
t.Skipf("Skip until %s is resolved", "https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/31457")
testutils.SkipIfNotContainerTest(t)
if runtime.GOOS == "darwin" {
t.Skip("unable to share sockets between mac and d4m vm: https://github.com/docker/for-mac/issues/483#issuecomment-758836836")
}

testutils.AssertAllMetricsReceived(t, "bundled.yaml", "otlp_exporter.yaml",
oracledb, []testutils.CollectorBuilder{
nil, []testutils.CollectorBuilder{
func(c testutils.Collector) testutils.Collector {
cc := c.(*testutils.CollectorContainer)
cc.Container = cc.Container.WithBinds("/var/run/docker.sock:/var/run/docker.sock:ro")
Expand Down
10 changes: 1 addition & 9 deletions tests/receivers/oracledb/oracledb_test.go
Expand Up @@ -18,24 +18,16 @@
package tests

import (
"path"
"testing"
"time"

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

// The Oracle DB container takes close to 10 minutes on a local machine to do the default setup, so the best way to
// account for startup time is to wait for the container to be healthy before continuing test.
var oracledb = []testutils.Container{testutils.NewContainer().WithContext(
path.Join(".", "testdata", "server"),
).WithName("oracledb").WithExposedPorts("1521:1521").WillWaitForHealth(5 * time.Minute)}

// This test ensures the collector can connect to an Oracle DB, and properly get metrics. It's not intended to
// test the receiver itself.
func TestOracleDBIntegration(t *testing.T) {
testutils.AssertAllMetricsReceived(t, "all.yaml", "all_metrics_config.yaml",
oracledb, []testutils.CollectorBuilder{
nil, []testutils.CollectorBuilder{
func(collector testutils.Collector) testutils.Collector {
return collector.WithEnv(map[string]string{"ORACLEDB_URL": "oracle://otel:password@localhost:1521/XE"})
},
Expand Down