-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cross-check Go binary in
analyze
Action
- Loading branch information
Showing
4 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import test from "ava"; | ||
|
||
import { ResolveBuildEnvironmentOutput } from "./codeql"; | ||
import * as resolveEnvironment from "./resolve-environment"; | ||
|
||
test("inferRunnerImage inserts runnerImage key", async (t) => { | ||
t.assert( | ||
resolveEnvironment.inferRunnerImage({ name: "windows" }).runnerImage === | ||
"windows-latest", | ||
"Result does not contain expected runnerImage" | ||
); | ||
t.assert( | ||
resolveEnvironment.inferRunnerImage({ name: "linux" }).runnerImage === | ||
"ubuntu-latest", | ||
"Result does not contain expected runnerImage" | ||
); | ||
t.assert( | ||
resolveEnvironment.inferRunnerImage({ name: "macos" }).runnerImage === | ||
"macos-latest", | ||
"Result does not contain expected runnerImage" | ||
); | ||
}); | ||
|
||
test("inferRunnerImages inserts runnerImage keys", async (t) => { | ||
const testData: ResolveBuildEnvironmentOutput = { | ||
configuration: { | ||
csharp: { os: { name: "windows" } }, | ||
swift: { os: { name: "macos" } }, | ||
}, | ||
}; | ||
resolveEnvironment.inferRunnerImages(testData); | ||
|
||
t.assert(testData.configuration?.csharp.os?.runnerImage, "blerg"); | ||
|
||
}); |