Make name of debugging artifact and DB within it configurable

This commit is contained in:
Edoardo Pirovano
2022-01-07 13:11:51 +00:00
parent 848e5140d4
commit e677af3fd0
42 changed files with 244 additions and 83 deletions

View File

@@ -87,6 +87,8 @@ test("load empty config", async (t) => {
undefined,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -106,6 +108,8 @@ test("load empty config", async (t) => {
undefined,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -150,6 +154,8 @@ test("loading config saves config", async (t) => {
undefined,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -180,6 +186,8 @@ test("load input outside of workspace", async (t) => {
"../input",
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -217,6 +225,8 @@ test("load non-local input with invalid repo syntax", async (t) => {
configFile,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -255,6 +265,8 @@ test("load non-existent input", async (t) => {
configFile,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -340,6 +352,8 @@ test("load non-empty input", async (t) => {
dbLocation: path.resolve(tmpDir, "codeql_databases"),
packs: {} as configUtils.Packs,
debugMode: false,
debugArtifactName: "my-artifact",
debugDatabaseName: "my-db",
};
const languages = "javascript";
@@ -352,6 +366,8 @@ test("load non-empty input", async (t) => {
configFilePath,
undefined,
false,
"my-artifact",
"my-db",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -417,6 +433,8 @@ test("Default queries are used", async (t) => {
configFilePath,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -490,6 +508,8 @@ test("Queries can be specified in config file", async (t) => {
configFilePath,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -557,6 +577,8 @@ test("Queries from config file can be overridden in workflow file", async (t) =>
configFilePath,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -622,6 +644,8 @@ test("Queries in workflow file can be used in tandem with the 'disable default q
configFilePath,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -680,6 +704,8 @@ test("Multiple queries can be specified in workflow file, no config file require
undefined,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -759,6 +785,8 @@ test("Queries in workflow file can be added to the set of queries without overri
configFilePath,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -828,6 +856,8 @@ test("Invalid queries in workflow file handled correctly", async (t) => {
undefined,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -894,6 +924,8 @@ test("API client used when reading remote config", async (t) => {
configFile,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -922,6 +954,8 @@ test("Remote config handles the case where a directory is provided", async (t) =
repoReference,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -958,6 +992,8 @@ test("Invalid format of remote config handled correctly", async (t) => {
repoReference,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -995,6 +1031,8 @@ test("No detected languages", async (t) => {
undefined,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -1024,6 +1062,8 @@ test("Unknown languages", async (t) => {
undefined,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -1075,6 +1115,8 @@ test("Config specifies packages", async (t) => {
configFile,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -1135,6 +1177,8 @@ test("Config specifies packages for multiple languages", async (t) => {
configFile,
undefined,
false,
"",
"",
{ owner: "github", repo: "example" },
tmpDir,
tmpDir,
@@ -1211,6 +1255,8 @@ function doInvalidInputTest(
configFile,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,
@@ -1684,6 +1730,8 @@ async function mlPoweredQueriesMacro(
undefined,
undefined,
false,
"",
"",
{ owner: "github", repo: "example " },
tmpDir,
tmpDir,