Link K8S deps properly
This commit is contained in:
parent
0ac77cdb15
commit
f0260fc819
64 changed files with 4282 additions and 3069 deletions
12
tests/api.js
12
tests/api.js
|
@ -7,16 +7,18 @@ import axios from "axios";
|
|||
const qltr = new Qualiteer();
|
||||
await qltr.start();
|
||||
|
||||
const url = "https://Qualiteer.elijahparker3.repl.co";
|
||||
const url = process.env.QUALITEER_EXECUTOR_URL;
|
||||
|
||||
const testsUrl = "/api/catalog/tests";
|
||||
const mappingsUrl = "/api/catalog/pipeline-mappings";
|
||||
const resultsUrl = "/api/results/failing";
|
||||
|
||||
const get = (...args) => axios.get(`${url}/${args[0]}`, args[1]);
|
||||
const get = (...args) => axios.get(`${url}${args[0]}`, args[1]);
|
||||
|
||||
var res = await get(resultsUrl);
|
||||
const mappings = await get(resultsUrl, {}).catch((e) => console.log(e));
|
||||
console.log(mappings.data);
|
||||
/*var res = await get(resultsUrl);
|
||||
console.log(res.data);
|
||||
|
||||
res = await get(resultsUrl, { headers: { count: true } });
|
||||
|
||||
console.log(res.data);
|
||||
console.log(res.data);*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default function failingTest() {
|
||||
console.log("This came from a failing test!");
|
||||
return { status: 1 };
|
||||
return { status: 1, message: "This test always fails :(" };
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import axios from "axios";
|
||||
import Rabbiteer from "rabbiteer";
|
||||
import primary from "./primary.js";
|
||||
import secondary1 from "./secondary1.js";
|
||||
import secondary2 from "./secondary2.js";
|
||||
|
@ -13,11 +14,15 @@ import failing from "./failing.js";
|
|||
|
||||
// Constants
|
||||
const liveUpdateDelay = 100;
|
||||
const endLiveCount = 20;
|
||||
const reportingUrl = `${process.env.QUALITEER_URL}/api/dev/rabbit/TestResults`;
|
||||
const endLiveCount = 200;
|
||||
const reportingUrl = `${process.env.QUALITEER_EXECUTOR_URL}/api/dev/rabbit/TestResults`;
|
||||
// Pull args
|
||||
const args = process.argv.slice(2);
|
||||
const test = (args.find((v) => v.includes("test=")) ?? "").replace("test=", "");
|
||||
const isTriage = (args.find((v) => v.includes("isTriage=")) ?? "").replace(
|
||||
"isTriage=",
|
||||
""
|
||||
);
|
||||
var pipeline = (args.find((v) => v.includes("pipeline=")) ?? "").replace(
|
||||
"pipeline=",
|
||||
""
|
||||
|
@ -58,14 +63,26 @@ const runTests = () => {
|
|||
|
||||
// Run
|
||||
liveIndicator();
|
||||
setTimeout(() => {
|
||||
setTimeout(async () => {
|
||||
const status = runTests();
|
||||
if (pipeline) pipeline.testData = status.pipelineData;
|
||||
const testResult = {
|
||||
...status,
|
||||
failed: status.status !== 0,
|
||||
name: test,
|
||||
pipeline,
|
||||
triage: isTriage === "true",
|
||||
};
|
||||
|
||||
/*const rbt = new Rabbiteer(null, [], {
|
||||
autoRabbit: { user: "guest", pass: "guest" },
|
||||
});
|
||||
await rbt.connect();
|
||||
const data = JSON.stringify(testResult);
|
||||
await rbt.publishMessageWithTimeout("TestResults", data);
|
||||
rbt.disconnect();
|
||||
if (status.status === 1) process.exit(1);*/
|
||||
|
||||
axios
|
||||
.post(reportingUrl, { testResult })
|
||||
.catch((e) => {
|
||||
|
|
|
@ -7,7 +7,7 @@ import { Initiator, Executor } from "qualiteer/clients";
|
|||
const qltr = new Qualiteer();
|
||||
await qltr.start();
|
||||
|
||||
const url = process.env.QUALITEER_URL;
|
||||
const url = process.env.QUALITEER_EXECUTOR_URL;
|
||||
|
||||
// Create an initiator and make a job request
|
||||
const primary = new Initiator(url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue