mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 02:01:27 +00:00
Remove unused bundle download fields
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -192,7 +192,7 @@ test.serial(
|
||||
t.is(result.toolsVersion, `2.15.0`);
|
||||
t.is(result.toolsSource, ToolsSource.Download);
|
||||
if (result.toolsDownloadStatusReport) {
|
||||
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||
assertDownloadDurationInteger(t, result.toolsDownloadStatusReport);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -231,7 +231,7 @@ test.serial(
|
||||
t.deepEqual(result.toolsVersion, "0.0.0-20200610");
|
||||
t.is(result.toolsSource, ToolsSource.Download);
|
||||
if (result.toolsDownloadStatusReport) {
|
||||
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||
assertDownloadDurationInteger(t, result.toolsDownloadStatusReport);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -330,9 +330,7 @@ for (const toolcacheVersion of [
|
||||
SAMPLE_DEFAULT_CLI_VERSION.enabledVersions[0].cliVersion,
|
||||
);
|
||||
t.is(result.toolsSource, ToolsSource.Toolcache);
|
||||
t.is(result.toolsDownloadStatusReport?.combinedDurationMs, undefined);
|
||||
t.is(result.toolsDownloadStatusReport?.downloadDurationMs, undefined);
|
||||
t.is(result.toolsDownloadStatusReport?.extractionDurationMs, undefined);
|
||||
t.is(result.toolsDownloadStatusReport, undefined);
|
||||
});
|
||||
},
|
||||
);
|
||||
@@ -373,9 +371,7 @@ test.serial(
|
||||
);
|
||||
t.deepEqual(result.toolsVersion, "0.0.0-20200601");
|
||||
t.is(result.toolsSource, ToolsSource.Toolcache);
|
||||
t.is(result.toolsDownloadStatusReport?.combinedDurationMs, undefined);
|
||||
t.is(result.toolsDownloadStatusReport?.downloadDurationMs, undefined);
|
||||
t.is(result.toolsDownloadStatusReport?.extractionDurationMs, undefined);
|
||||
t.is(result.toolsDownloadStatusReport, undefined);
|
||||
|
||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||
t.is(cachedVersions.length, 1);
|
||||
@@ -422,7 +418,7 @@ test.serial(
|
||||
t.deepEqual(result.toolsVersion, defaults.cliVersion);
|
||||
t.is(result.toolsSource, ToolsSource.Download);
|
||||
if (result.toolsDownloadStatusReport) {
|
||||
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||
assertDownloadDurationInteger(t, result.toolsDownloadStatusReport);
|
||||
}
|
||||
|
||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||
@@ -463,7 +459,7 @@ test.serial(
|
||||
t.deepEqual(result.toolsVersion, defaults.cliVersion);
|
||||
t.is(result.toolsSource, ToolsSource.Download);
|
||||
if (result.toolsDownloadStatusReport) {
|
||||
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||
assertDownloadDurationInteger(t, result.toolsDownloadStatusReport);
|
||||
}
|
||||
|
||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||
@@ -507,7 +503,7 @@ test.serial(
|
||||
t.is(result.toolsVersion, "0.0.0-20230203");
|
||||
t.is(result.toolsSource, ToolsSource.Download);
|
||||
if (result.toolsDownloadStatusReport) {
|
||||
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||
assertDownloadDurationInteger(t, result.toolsDownloadStatusReport);
|
||||
}
|
||||
|
||||
const cachedVersions = toolcache.findAllVersions("CodeQL");
|
||||
@@ -519,14 +515,12 @@ test.serial(
|
||||
},
|
||||
);
|
||||
|
||||
function assertDurationsInteger(
|
||||
function assertDownloadDurationInteger(
|
||||
t: ExecutionContext<unknown>,
|
||||
statusReport: ToolsDownloadStatusReport,
|
||||
) {
|
||||
t.assert(Number.isInteger(statusReport?.combinedDurationMs));
|
||||
if (statusReport.downloadDurationMs !== undefined) {
|
||||
t.assert(Number.isInteger(statusReport?.downloadDurationMs));
|
||||
t.assert(Number.isInteger(statusReport?.extractionDurationMs));
|
||||
t.assert(Number.isInteger(statusReport.downloadDurationMs));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user