Log a warning if the API version is not supported.
This commit is contained in:
parent
46110c361b
commit
1220ae5bfd
34 changed files with 369 additions and 61 deletions
|
|
@ -78,6 +78,7 @@ test("load empty config", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
logger
|
||||
);
|
||||
|
||||
|
|
@ -93,6 +94,7 @@ test("load empty config", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
logger
|
||||
)
|
||||
);
|
||||
|
|
@ -130,6 +132,7 @@ test("loading config saves config", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
logger
|
||||
);
|
||||
|
||||
|
|
@ -156,6 +159,7 @@ test("load input outside of workspace", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
throw new Error("initConfig did not throw error");
|
||||
|
|
@ -189,6 +193,7 @@ test("load non-local input with invalid repo syntax", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
throw new Error("initConfig did not throw error");
|
||||
|
|
@ -223,6 +228,7 @@ test("load non-existent input", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
throw new Error("initConfig did not throw error");
|
||||
|
|
@ -307,6 +313,7 @@ test("load non-empty input", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
|
||||
|
|
@ -368,6 +375,7 @@ test("Default queries are used", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
|
||||
|
|
@ -437,6 +445,7 @@ test("Queries can be specified in config file", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
|
||||
|
|
@ -500,6 +509,7 @@ test("Queries from config file can be overridden in workflow file", async (t) =>
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
|
||||
|
|
@ -561,6 +571,7 @@ test("Queries in workflow file can be used in tandem with the 'disable default q
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
|
||||
|
|
@ -612,6 +623,7 @@ test("Multiple queries can be specified in workflow file, no config file require
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
|
||||
|
|
@ -681,6 +693,7 @@ test("Queries in workflow file can be added to the set of queries without overri
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
|
||||
|
|
@ -743,6 +756,7 @@ test("Invalid queries in workflow file handled correctly", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
t.fail("initConfig did not throw error");
|
||||
|
|
@ -805,6 +819,7 @@ test("API client used when reading remote config", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
t.assert(spyGetContents.called);
|
||||
|
|
@ -829,6 +844,7 @@ test("Remote config handles the case where a directory is provided", async (t) =
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
throw new Error("initConfig did not throw error");
|
||||
|
|
@ -861,6 +877,7 @@ test("Invalid format of remote config handled correctly", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
throw new Error("initConfig did not throw error");
|
||||
|
|
@ -889,6 +906,7 @@ test("No detected languages", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
throw new Error("initConfig did not throw error");
|
||||
|
|
@ -914,6 +932,7 @@ test("Unknown languages", async (t) => {
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
throw new Error("initConfig did not throw error");
|
||||
|
|
@ -960,6 +979,7 @@ function doInvalidInputTest(
|
|||
tmpDir,
|
||||
"token",
|
||||
"https://github.example.com",
|
||||
"runner",
|
||||
getRunnerLogger(true)
|
||||
);
|
||||
throw new Error("initConfig did not throw error");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue