Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
albertandrejev committed Jul 31, 2023
1 parent fba38dd commit abcdae4
Show file tree
Hide file tree
Showing 28 changed files with 111 additions and 5,305 deletions.
6 changes: 3 additions & 3 deletions download_artifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const wait = async (seconds) =>
setTimeout(() => r(true), 1000 * seconds);
});

const wait.getWithAttempts = async (getFunc, readyFunc, numAttempts = 20) => {
const getWithAttempts = async (getFunc, readyFunc, numAttempts = 20) => {
let error = null;
let data = null;
const delay = DELAY_BETWEEN_TRIES;
Expand All @@ -82,7 +82,7 @@ const wait.getWithAttempts = async (getFunc, readyFunc, numAttempts = 20) => {
error = e;
}
console.log(`${numAttempts * delay} seconds left`);
await wait.wait(delay);
await wait(delay);
}
throw error != null
? error
Expand Down Expand Up @@ -238,7 +238,7 @@ const getChecksumsTxt = async (repo_name, commit_hash, ci_token, timeout) => {
const attempts_number = timeout / DELAY_BETWEEN_TRIES;
try {
return (
await wait.getWithAttempts(
await getWithAttempts(
async () => axios.get(url),
async (response) => response.status === 200,
attempts_number,
Expand Down
4 changes: 2 additions & 2 deletions globalSetup.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { setup } from './src/helpers/env';
import { env } from 'neutronjs';

export default async () => {
const host1 = process.env.NODE1_URL || 'http://localhost:1317';
const host2 = process.env.NODE2_URL || 'http://localhost:1316';
!process.env.NO_DOCKER && (await setup(host1, host2));
!process.env.NO_DOCKER && (await env.setup(host1, host2));
};
Loading

0 comments on commit abcdae4

Please sign in to comment.