Skip to content

Commit 2c9beca

Browse files
authored
ci: test oracledb without custom docker image (#6609)
1 parent b6077e7 commit 2c9beca

File tree

5 files changed

+13
-19
lines changed

5 files changed

+13
-19
lines changed

.github/workflows/apm-integrations.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -704,16 +704,9 @@ jobs:
704704
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
705705
- uses: ./.github/actions/plugins/test
706706

707-
# TODO: Install the Oracle client on the host and test Node >=16.
708707
# TODO: Figure out why nyc stopped working with EACCESS errors.
709708
oracledb:
710709
runs-on: ubuntu-latest
711-
container:
712-
image: bengl/node-12-with-oracle-client
713-
volumes:
714-
- /node20217:/node20217:rw,rshared
715-
- /node20217:/__e/node20:ro,rshared
716-
- /node20217:/__e/node24:ro,rshared
717710
services:
718711
oracledb:
719712
image: gvenzl/oracle-xe:18-slim
@@ -734,19 +727,22 @@ jobs:
734727
env:
735728
PLUGINS: oracledb
736729
SERVICES: oracledb
737-
DD_TEST_AGENT_URL: http://testagent:9126
738730
DD_INJECT_FORCE: 'true'
739731
steps:
740-
# https://github.com/actions/runner/issues/2906#issuecomment-2109514798
741-
- name: Install Node for runner (with glibc 2.17 compatibility)
742-
run: |
743-
curl -LO https://unofficial-builds.nodejs.org/download/release/v20.19.3/node-v20.19.3-linux-x64-glibc-217.tar.xz
744-
tar -xf node-v20.19.3-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
745732
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
746733
- uses: ./.github/actions/node
747734
with:
748735
version: eol
749736
- uses: ./.github/actions/install
737+
- run: |
738+
mkdir -p /opt/oracle
739+
cd /opt/oracle
740+
wget https://download.oracle.com/otn_software/linux/instantclient/1928000/instantclient-basic-linux.x64-19.28.0.0.0dbru.zip
741+
unzip instantclient-basic-linux.x64-19.28.0.0.0dbru.zip
742+
sudo apt-get update -y && sudo apt-get install -y libaio1t64
743+
sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
744+
sudo sh -c "echo /opt/oracle/instantclient_19_28 > /etc/ld.so.conf.d/oracle-instantclient.conf"
745+
sudo ldconfig
750746
- run: yarn config set ignore-engines true
751747
- run: yarn services --ignore-engines
752748
- run: yarn test:plugins --ignore-engines

packages/datadog-plugin-oracledb/test/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const agent = require('../../dd-trace/test/plugins/agent')
1010
const { ERROR_MESSAGE, ERROR_TYPE, ERROR_STACK } = require('../../dd-trace/src/constants')
1111
const { expectedSchema, rawExpectedSchema } = require('./naming')
1212

13-
const hostname = process.env.CI ? 'oracledb' : 'localhost'
13+
const hostname = 'localhost'
1414
// TODO: Use another port or db instance to differentiate it better from defaults
1515
const port = '1521'
1616
const dbInstance = 'xepdb1'

packages/datadog-plugin-oracledb/test/integration-test/client.spec.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ describe('esm', () => {
4141
assert.strictEqual(checkSpansForServiceName(payload, 'oracle.query'), true)
4242
})
4343

44-
proc = await spawnPluginIntegrationTestProc(sandbox.folder, 'server.mjs', agent.port, undefined, {
45-
LD_LIBRARY_PATH: '/usr/lib/oracle/18.5/client64/lib:'
46-
})
44+
proc = await spawnPluginIntegrationTestProc(sandbox.folder, 'server.mjs', agent.port)
4745

4846
await res
4947
}).timeout(20000)

packages/datadog-plugin-oracledb/test/integration-test/server.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'dd-trace/init.js'
22
import oracledb from 'oracledb'
33

4-
const hostname = 'oracledb'
4+
const hostname = 'localhost'
55

66
const config = {
77
user: 'test',

packages/dd-trace/test/setup/services/oracledb.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const RetryOperation = require('../operation')
44
const oracledb = require('../../../../../versions/oracledb').get()
55

6-
const hostname = process.env.CI ? 'oracledb' : 'localhost'
6+
const hostname = 'localhost'
77

88
function waitForOracledb () {
99
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)