Skip to content

Commit

Permalink
Merge branch 'master' into migrate-github-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnoble committed Jun 16, 2023
2 parents c3c853a + b23aaf9 commit 185022f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/scripts/src/helpers/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const OPENSEARCH_HOSTNAME = process.env.OPENSEARCH_HOSTNAME || HOST_IP;
export const OPENSEARCH_PORT = process.env.OPENSEARCH_PORT || '49210';
export const OPENSEARCH_USER = process.env.OPENSEARCH_USER || 'admin';
export const OPENSEARCH_PASSWORD = process.env.OPENSEARCH_PASSWORD || 'admin';
export const OPENSEARCH_VERSION = process.env.OPENSEARCH_VERSION || '1.3.0';
export const OPENSEARCH_VERSION = process.env.OPENSEARCH_VERSION || '1.3.6';
export const OPENSEARCH_HOST = `http://${OPENSEARCH_USER}:${OPENSEARCH_PASSWORD}@${OPENSEARCH_HOSTNAME}:${OPENSEARCH_PORT}`;
export const OPENSEARCH_DOCKER_IMAGE = process.env.OPENSEARCH_DOCKER_IMAGE || 'opensearchproject/opensearch';

Expand Down
17 changes: 6 additions & 11 deletions packages/scripts/src/helpers/test-runner/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ async function checkRestrainedOpensearch(
({ body } = await got(host, {
username,
password,
rejectUnauthorized: false,
https: { rejectUnauthorized: false },
responseType: 'json',
throwHttpErrors: true,
retry: 0,
Expand All @@ -355,8 +355,7 @@ async function checkRestrainedOpensearch(
const actual: string = body.version.number;
const expected = options.opensearchVersion;

const satifies = semver.satisfies(actual, `^${expected}`);
if (satifies) {
if (semver.satisfies(actual, `^${expected}`)) {
const took = ts.toHumanTime(Date.now() - startTime);
signale.success(`restrained opensearch@${actual} is running at ${host}, took ${took}`);
return true;
Expand Down Expand Up @@ -400,7 +399,7 @@ async function checkOpensearch(options: TestOptions, startTime: number): Promise
({ body } = await got(host, {
username,
password,
rejectUnauthorized: false,
https: { rejectUnauthorized: false },
responseType: 'json',
throwHttpErrors: true,
retry: 0,
Expand All @@ -423,8 +422,7 @@ async function checkOpensearch(options: TestOptions, startTime: number): Promise
const actual: string = body.version.number;
const expected = options.opensearchVersion;

const satifies = semver.satisfies(actual, `^${expected}`);
if (satifies) {
if (semver.satisfies(actual, `^${expected}`)) {
const took = ts.toHumanTime(Date.now() - startTime);
signale.success(`opensearch@${actual} is running at ${host}, took ${took}`);
return true;
Expand Down Expand Up @@ -488,8 +486,7 @@ async function checkRestrainedElasticsearch(
const actual: string = body.version.number;
const expected = options.elasticsearchVersion;

const satifies = semver.satisfies(actual, `^${expected}`);
if (satifies) {
if (semver.satisfies(actual, `^${expected}`)) {
const took = ts.toHumanTime(Date.now() - startTime);
signale.success(`elasticsearch@${actual} is running at ${host}, took ${took}`);
return true;
Expand Down Expand Up @@ -551,9 +548,7 @@ async function checkElasticsearch(options: TestOptions, startTime: number): Prom
const actual: string = body.version.number;
const expected = options.elasticsearchVersion;

const satifies = semver.satisfies(actual, `^${expected}`);

if (satifies) {
if (semver.satisfies(actual, `^${expected}`)) {
const took = ts.toHumanTime(Date.now() - startTime);
signale.success(`elasticsearch@${actual} is running at ${host}, took ${took}`);
return true;
Expand Down

0 comments on commit 185022f

Please sign in to comment.