Update non-generated tests
This commit is contained in:
parent
619f0d628b
commit
66ebfdfab6
4 changed files with 12 additions and 12 deletions
4
.github/workflows/debug-artifacts-legacy.yml
vendored
4
.github/workflows/debug-artifacts-legacy.yml
vendored
|
|
@ -24,11 +24,11 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- stable-v2.13.5
|
|
||||||
- stable-v2.14.6
|
- stable-v2.14.6
|
||||||
- stable-v2.15.5
|
- stable-v2.15.5
|
||||||
- stable-v2.16.6
|
- stable-v2.16.6
|
||||||
- stable-v2.17.6
|
- stable-v2.17.6
|
||||||
|
- stable-v2.18.4
|
||||||
- default
|
- default
|
||||||
- linked
|
- linked
|
||||||
- nightly-latest
|
- nightly-latest
|
||||||
|
|
@ -73,7 +73,7 @@ jobs:
|
||||||
- name: Check expected artifacts exist
|
- name: Check expected artifacts exist
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
VERSIONS="stable-v2.13.5 stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.6 default linked nightly-latest"
|
VERSIONS="stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.6 stable-v2.18.4 default linked nightly-latest"
|
||||||
LANGUAGES="cpp csharp go java javascript python"
|
LANGUAGES="cpp csharp go java javascript python"
|
||||||
for version in $VERSIONS; do
|
for version in $VERSIONS; do
|
||||||
pushd "./my-debug-artifacts-${version//./}"
|
pushd "./my-debug-artifacts-${version//./}"
|
||||||
|
|
|
||||||
4
.github/workflows/debug-artifacts.yml
vendored
4
.github/workflows/debug-artifacts.yml
vendored
|
|
@ -23,11 +23,11 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- stable-v2.13.5
|
|
||||||
- stable-v2.14.6
|
- stable-v2.14.6
|
||||||
- stable-v2.15.5
|
- stable-v2.15.5
|
||||||
- stable-v2.16.6
|
- stable-v2.16.6
|
||||||
- stable-v2.17.6
|
- stable-v2.17.6
|
||||||
|
- stable-v2.18.4
|
||||||
- default
|
- default
|
||||||
- linked
|
- linked
|
||||||
- nightly-latest
|
- nightly-latest
|
||||||
|
|
@ -72,7 +72,7 @@ jobs:
|
||||||
- name: Check expected artifacts exist
|
- name: Check expected artifacts exist
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
VERSIONS="stable-v2.13.5 stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.6 default linked nightly-latest"
|
VERSIONS="stable-v2.14.6 stable-v2.15.5 stable-v2.16.6 stable-v2.17.6 stable-v2.18.4 default linked nightly-latest"
|
||||||
LANGUAGES="cpp csharp go java javascript python"
|
LANGUAGES="cpp csharp go java javascript python"
|
||||||
for version in $VERSIONS; do
|
for version in $VERSIONS; do
|
||||||
pushd "./my-debug-artifacts-${version//./}"
|
pushd "./my-debug-artifacts-${version//./}"
|
||||||
|
|
|
||||||
8
lib/codeql.test.js
generated
8
lib/codeql.test.js
generated
|
|
@ -109,13 +109,13 @@ function mockApiDetails(apiDetails) {
|
||||||
await util.withTmpDir(async (tmpDir) => {
|
await util.withTmpDir(async (tmpDir) => {
|
||||||
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
(0, testing_utils_1.setupActionsVars)(tmpDir, tmpDir);
|
||||||
const url = (0, testing_utils_1.mockBundleDownloadApi)({
|
const url = (0, testing_utils_1.mockBundleDownloadApi)({
|
||||||
tagName: `codeql-bundle-v2.14.0`,
|
tagName: `codeql-bundle-v2.15.0`,
|
||||||
isPinned: false,
|
isPinned: false,
|
||||||
});
|
});
|
||||||
const result = await codeql.setupCodeQL(url, testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
const result = await codeql.setupCodeQL(url, testing_utils_1.SAMPLE_DOTCOM_API_DETAILS, tmpDir, util.GitHubVariant.DOTCOM, testing_utils_1.SAMPLE_DEFAULT_CLI_VERSION, (0, testing_utils_1.createFeatures)([]), (0, logging_1.getRunnerLogger)(true), false);
|
||||||
t.is(toolcache.findAllVersions("CodeQL").length, 1);
|
t.is(toolcache.findAllVersions("CodeQL").length, 1);
|
||||||
t.assert(toolcache.find("CodeQL", `2.14.0`));
|
t.assert(toolcache.find("CodeQL", `2.15.0`));
|
||||||
t.is(result.toolsVersion, `2.14.0`);
|
t.is(result.toolsVersion, `2.15.0`);
|
||||||
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
t.is(result.toolsSource, setup_codeql_1.ToolsSource.Download);
|
||||||
if (result.toolsDownloadStatusReport) {
|
if (result.toolsDownloadStatusReport) {
|
||||||
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||||
|
|
@ -265,7 +265,7 @@ for (const toolcacheVersion of [
|
||||||
mockApiDetails(testing_utils_1.SAMPLE_DOTCOM_API_DETAILS);
|
mockApiDetails(testing_utils_1.SAMPLE_DOTCOM_API_DETAILS);
|
||||||
sinon.stub(actionsUtil, "isRunningLocalAction").returns(true);
|
sinon.stub(actionsUtil, "isRunningLocalAction").returns(true);
|
||||||
const releasesApiMock = mockReleaseApi({
|
const releasesApiMock = mockReleaseApi({
|
||||||
assetNames: ["cli-version-2.13.5.txt"],
|
assetNames: ["cli-version-2.14.6.txt"],
|
||||||
tagName: "codeql-bundle-20230203",
|
tagName: "codeql-bundle-20230203",
|
||||||
});
|
});
|
||||||
(0, testing_utils_1.mockBundleDownloadApi)({
|
(0, testing_utils_1.mockBundleDownloadApi)({
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ test("caches semantically versioned bundles using their semantic version number"
|
||||||
await util.withTmpDir(async (tmpDir) => {
|
await util.withTmpDir(async (tmpDir) => {
|
||||||
setupActionsVars(tmpDir, tmpDir);
|
setupActionsVars(tmpDir, tmpDir);
|
||||||
const url = mockBundleDownloadApi({
|
const url = mockBundleDownloadApi({
|
||||||
tagName: `codeql-bundle-v2.14.0`,
|
tagName: `codeql-bundle-v2.15.0`,
|
||||||
isPinned: false,
|
isPinned: false,
|
||||||
});
|
});
|
||||||
const result = await codeql.setupCodeQL(
|
const result = await codeql.setupCodeQL(
|
||||||
|
|
@ -165,8 +165,8 @@ test("caches semantically versioned bundles using their semantic version number"
|
||||||
);
|
);
|
||||||
|
|
||||||
t.is(toolcache.findAllVersions("CodeQL").length, 1);
|
t.is(toolcache.findAllVersions("CodeQL").length, 1);
|
||||||
t.assert(toolcache.find("CodeQL", `2.14.0`));
|
t.assert(toolcache.find("CodeQL", `2.15.0`));
|
||||||
t.is(result.toolsVersion, `2.14.0`);
|
t.is(result.toolsVersion, `2.15.0`);
|
||||||
t.is(result.toolsSource, ToolsSource.Download);
|
t.is(result.toolsSource, ToolsSource.Download);
|
||||||
if (result.toolsDownloadStatusReport) {
|
if (result.toolsDownloadStatusReport) {
|
||||||
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
assertDurationsInteger(t, result.toolsDownloadStatusReport);
|
||||||
|
|
@ -409,7 +409,7 @@ test("bundle URL from another repo is cached as 0.0.0-bundleVersion", async (t)
|
||||||
mockApiDetails(SAMPLE_DOTCOM_API_DETAILS);
|
mockApiDetails(SAMPLE_DOTCOM_API_DETAILS);
|
||||||
sinon.stub(actionsUtil, "isRunningLocalAction").returns(true);
|
sinon.stub(actionsUtil, "isRunningLocalAction").returns(true);
|
||||||
const releasesApiMock = mockReleaseApi({
|
const releasesApiMock = mockReleaseApi({
|
||||||
assetNames: ["cli-version-2.13.5.txt"],
|
assetNames: ["cli-version-2.14.6.txt"],
|
||||||
tagName: "codeql-bundle-20230203",
|
tagName: "codeql-bundle-20230203",
|
||||||
});
|
});
|
||||||
mockBundleDownloadApi({
|
mockBundleDownloadApi({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue