Skip to content

Commit

Permalink
test(edot): re-enable instr-elastic-openai test with fixed Ollama (#591)
Browse files Browse the repository at this point in the history
Using 'ollama/ollama:0.5.8' Docker image for now.

Refs: #588
Fixes: #587
  • Loading branch information
trentm authored Feb 12, 2025
1 parent 198928c commit 3b675d0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/test-edot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ jobs:
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 1

# Disabled until https://github.com/ollama/ollama/issues/8400 is resolved.
# ollama:
# # A light fork of Ollama to float some in-progress contributions related
# # to more closely matching OpenAI behavior.
# image: ghcr.io/elastic/ollama/ollama:testing
# # image: ollama/ollama:0.5.7
# ports:
# - 11434:11434
ollama:
# A light fork of Ollama to float some in-progress contributions related
# to more closely matching OpenAI behavior.
# TODO: go back to this image when updated to 0.5.8 base?
# image: ghcr.io/elastic/ollama/ollama:testing
image: ollama/ollama:0.5.8
ports:
- 11434:11434

postgres:
image: postgres:16
Expand Down
28 changes: 12 additions & 16 deletions packages/opentelemetry-node/test/instr-elastic-openai.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,20 @@
const http = require('http');
const {basename} = require('path');
const test = require('tape');
// const semver = require('semver');
const semver = require('semver');
const {runTestFixtures, assertDeepMatch} = require('./testutils');

let skip = true;
console.log(
'# SKIP elastic/instr-openai test until https://github.com/ollama/ollama/issues/8400 is resolved'
);
// let skip = process.env.TEST_GENAI_MODEL === undefined;
// if (skip) {
// console.log(
// '# SKIP elastic openai tests: TEST_GENAI_MODEL is not set (load env from test/test-services.env)'
// );
// } else {
// skip = !semver.satisfies(process.version, '>=18');
// if (skip) {
// console.log('# SKIP elastic openai requires node >=18');
// }
// }
let skip = process.env.TEST_GENAI_MODEL === undefined;
if (skip) {
console.log(
'# SKIP elastic openai tests: TEST_GENAI_MODEL is not set (load env from test/test-services.env)'
);
} else {
skip = !semver.satisfies(process.version, '>=18');
if (skip) {
console.log('# SKIP elastic openai requires node >=18');
}
}

/** @type {import('./testutils').TestFixture[]} */
const testFixtures = [
Expand Down

0 comments on commit 3b675d0

Please sign in to comment.