Upgrades people!
This commit is contained in:
parent
f84234150f
commit
8ad56e8d38
40 changed files with 483 additions and 379 deletions
|
@ -10,13 +10,15 @@ const table = "silenced_tests";
|
|||
const PG_DISABLED = process.env.POSTGRES_DISABLED;
|
||||
|
||||
const silencedMock = () => {
|
||||
return [{
|
||||
name: `failing`,
|
||||
class: `failing.js`,
|
||||
method: "FAKEMETHOD",
|
||||
id: 0,
|
||||
silencedUntil: new Date().toJSON(),
|
||||
}]
|
||||
return [
|
||||
{
|
||||
name: `failing`,
|
||||
class: `failing.js`,
|
||||
method: "FAKEMETHOD",
|
||||
id: 0,
|
||||
silencedUntil: new Date().toJSON(),
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
// Queries
|
||||
|
|
|
@ -20,12 +20,12 @@ const testsMock = () => {
|
|||
isCompound: false,
|
||||
type: "api",
|
||||
description: "This is a single test",
|
||||
tags: ["cron_1hour","reg_us", "env_ci", "proj_core", "skip_alt"],
|
||||
tags: ["cron_1hour", "reg_us", "env_ci", "proj_core", "skip_alt"],
|
||||
path: "tests/assets/suite/single.js",
|
||||
created: Date.now(),
|
||||
mergeRequest: "https://example.com"
|
||||
mergeRequest: "https://example.com",
|
||||
},
|
||||
{
|
||||
{
|
||||
id: 1,
|
||||
name: "failing",
|
||||
class: "failing.js",
|
||||
|
@ -33,12 +33,12 @@ const testsMock = () => {
|
|||
isCompound: false,
|
||||
type: "ui",
|
||||
description: "This is a failing test",
|
||||
tags: ["cron_1hour","reg_us", "env_ci", "proj_core"],
|
||||
tags: ["cron_1hour", "reg_us", "env_ci", "proj_core"],
|
||||
path: "tests/assets/suite/failing.js",
|
||||
created: Date.now(),
|
||||
mergeRequest: "https://example.com"
|
||||
mergeRequest: "https://example.com",
|
||||
},
|
||||
{
|
||||
{
|
||||
id: 2,
|
||||
name: "primary",
|
||||
class: "primary.js",
|
||||
|
@ -46,11 +46,18 @@ const testsMock = () => {
|
|||
isCompound: true,
|
||||
type: "api",
|
||||
description: "This is a primary test",
|
||||
tags: ["cron_1hour","reg_us", "proj_core", "skip_alt", "compound_secondary"],
|
||||
tags: [
|
||||
"cron_1hour",
|
||||
"reg_us",
|
||||
"proj_core",
|
||||
"skip_alt",
|
||||
"compound_secondary",
|
||||
],
|
||||
path: "tests/assets/suite/primary.js",
|
||||
created: Date.now(),
|
||||
mergeRequest: "https://example.com"
|
||||
}, {
|
||||
mergeRequest: "https://example.com",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "secondary",
|
||||
class: "secondary.js",
|
||||
|
@ -58,12 +65,12 @@ const testsMock = () => {
|
|||
isCompound: true,
|
||||
type: "api",
|
||||
description: "This is a secondary test",
|
||||
tags: ["cron_1hour","reg_us", "proj_core", "compound_tertiary"],
|
||||
tags: ["cron_1hour", "reg_us", "proj_core", "compound_tertiary"],
|
||||
path: "tests/assets/suite/secondary.js",
|
||||
created: Date.now(),
|
||||
mergeRequest: "https://example.com"
|
||||
mergeRequest: "https://example.com",
|
||||
},
|
||||
{
|
||||
{
|
||||
id: 4,
|
||||
name: "tertiary",
|
||||
class: "tertiary.js",
|
||||
|
@ -71,21 +78,21 @@ const testsMock = () => {
|
|||
isCompound: true,
|
||||
type: "api",
|
||||
description: "This is a single test",
|
||||
tags: ["cron_1hour","reg_us", "proj_core"],
|
||||
tags: ["cron_1hour", "reg_us", "proj_core"],
|
||||
path: "tests/assets/suite/tertiary.js",
|
||||
created: Date.now(),
|
||||
mergeRequest: "https://example.com"
|
||||
mergeRequest: "https://example.com",
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
const mappingsMock = () => {
|
||||
return [
|
||||
["primary", "secondary1", "tertiary1"],
|
||||
["primary", "secondary1", "tertiary2"],
|
||||
["primary", "secondary2", "tertiary3"],
|
||||
];
|
||||
}
|
||||
["primary", "secondary1", "tertiary1"],
|
||||
["primary", "secondary1", "tertiary2"],
|
||||
["primary", "secondary2", "tertiary3"],
|
||||
];
|
||||
};
|
||||
|
||||
export const getTests = async () => {
|
||||
if (PG_DISABLED) return testsMock();
|
||||
|
|
|
@ -10,33 +10,35 @@ import {
|
|||
const table = "test_results";
|
||||
const PG_DISABLED = process.env.POSTGRES_DISABLED;
|
||||
|
||||
|
||||
const failingMock = () => {
|
||||
return [{
|
||||
name: "failing",
|
||||
class: "failing.js",
|
||||
timestamp: new Date().toJSON(),
|
||||
method: "FAKEMETHOD",
|
||||
cron: "1hour",
|
||||
type: "api",
|
||||
dailyFails: 12,
|
||||
screenshot: "https://picsum.photos/1920/1080",
|
||||
recentResults: [1, 0, 0, 1, 0],
|
||||
isCompound: false,
|
||||
failedMessage: `Some Test FailureMessage`,
|
||||
},{
|
||||
name: "secondary",
|
||||
class: "secondary.js",
|
||||
timestamp: new Date().toJSON(),
|
||||
method: "FAKEMETHOD",
|
||||
cron: "1hour",
|
||||
type: "api",
|
||||
dailyFails: 1,
|
||||
screenshot: "https://picsum.photos/1920/1080",
|
||||
recentResults: [1, 0, 0, 1, 0],
|
||||
isCompound: true,
|
||||
failedMessage: `Some Test FailureMessage from Secondary`,
|
||||
}]
|
||||
return [
|
||||
{
|
||||
name: "failing",
|
||||
class: "failing.js",
|
||||
timestamp: new Date().toJSON(),
|
||||
method: "FAKEMETHOD",
|
||||
cron: "1hour",
|
||||
type: "api",
|
||||
dailyFails: 12,
|
||||
screenshot: "https://picsum.photos/1920/1080",
|
||||
recentResults: [1, 0, 0, 1, 0],
|
||||
isCompound: false,
|
||||
failedMessage: `Some Test FailureMessage`,
|
||||
},
|
||||
{
|
||||
name: "secondary",
|
||||
class: "secondary.js",
|
||||
timestamp: new Date().toJSON(),
|
||||
method: "FAKEMETHOD",
|
||||
cron: "1hour",
|
||||
type: "api",
|
||||
dailyFails: 1,
|
||||
screenshot: "https://picsum.photos/1920/1080",
|
||||
recentResults: [1, 0, 0, 1, 0],
|
||||
isCompound: true,
|
||||
failedMessage: `Some Test FailureMessage from Secondary`,
|
||||
},
|
||||
];
|
||||
};
|
||||
// Queries
|
||||
export const insertTestResult = (testResult) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue