Skip to content

Commit

Permalink
Use correct arangoVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
pluma committed Jan 25, 2022
1 parent ee6c5b4 commit a40a590
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- run: npm install
- run: npm test
env:
ARANGO_RELEASE: ${{ matrix.arangodb-version }}
TEST_ARANGODB_URL: http://arangodb:8529
CI: true

Expand All @@ -38,7 +39,7 @@ jobs:

strategy:
matrix:
arangodb-version: [3.5, 3.6, 3.7]
arangodb-version: [3.6, 3.7, 3.8]

container:
image: buildkite/puppeteer:latest
Expand Down
13 changes: 10 additions & 3 deletions src/test/_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ import { Config, LoadBalancingStrategy } from "../connection";

const ARANGO_URL = process.env.TEST_ARANGODB_URL || "http://localhost:8529";
const ARANGO_VERSION = Number(
process.env.ARANGO_VERSION || process.env.ARANGOJS_DEVEL_VERSION || 39999
process.env.ARANGO_VERSION || process.env.ARANGOJS_DEVEL_VERSION || 0
);
const ARANGO_RELEASE = process.env.ARANGO_RELEASE || "";
let arangoVersion: number = 39999;
if (ARANGO_VERSION) arangoVersion = ARANGO_VERSION;
else if (ARANGO_RELEASE.includes(".")) {
const [major, minor] = ARANGO_RELEASE.split(".").map((v) => Number(v));
arangoVersion = (major * 100 + minor) * 100;
}
const ARANGO_LOAD_BALANCING_STRATEGY = process.env
.TEST_ARANGO_LOAD_BALANCING_STRATEGY as LoadBalancingStrategy | undefined;

Expand All @@ -12,12 +19,12 @@ export const config: Config & {
} = ARANGO_URL.includes(",")
? {
url: ARANGO_URL.split(",").filter((s) => Boolean(s)),
arangoVersion: ARANGO_VERSION,
arangoVersion,
precaptureStackTraces: true,
loadBalancingStrategy: ARANGO_LOAD_BALANCING_STRATEGY || "ROUND_ROBIN",
}
: {
url: ARANGO_URL,
arangoVersion: ARANGO_VERSION,
arangoVersion,
precaptureStackTraces: true,
};

0 comments on commit a40a590

Please sign in to comment.