Skip to content
Snippets Groups Projects
Commit 425a3be9 authored by Bryan Chen's avatar Bryan Chen
Browse files

able to configure url

parent be4a3579
Branches
No related merge requests found
Pipeline #265635 waiting for manual action with stages
in 2 minutes and 45 seconds
......@@ -26,6 +26,7 @@ enum StatusCode {
}
interface ILatestE2eParser {
url: string;
chain: keyof typeof endpoints;
}
......@@ -68,7 +69,10 @@ const main = async (args: ILatestE2eParser): Promise<StatusCode> => {
}
}
const responses = await Promise.all(urls.map((u) => request(u, HOST, PORT)));
const url = new URL(args.url);
const responses = await Promise.all(
urls.map((u) => request(u, url.host, Number(url.port)))
);
const errors: IRequest[] = [];
responses.forEach((res) => {
if (res.statusCode && res.statusCode >= 400) {
......@@ -106,6 +110,9 @@ parser.add_argument('--chain', {
choices: Object.keys(endpoints),
default: 'polkadot',
});
parser.add_argument('--url', {
default: `${HOST}:${PORT}}`,
});
const args = parser.parse_args() as ILatestE2eParser;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment