-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate PublishTestResultsV1 to Node 10 (#16664)
* Migrate to node10 * bump version * Fix first test * Migrate legasy tests to common tests * Update minimumAgentVersion * Update task.loc.json * update version Co-authored-by: Tatyana Kostromskaya (Akvelon) <[email protected]> Co-authored-by: Tatyana Kostromskaya <[email protected]> Co-authored-by: Max Podriezov <[email protected]>
- Loading branch information
1 parent
b11b006
commit 0db1b9a
Showing
20 changed files
with
367 additions
and
4,493 deletions.
There are no files selected for viewing
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
13 changes: 13 additions & 0 deletions
13
Tasks/PublishTestResultsV1/Tests/L0FilterDoesNotMatchAnyFile.ts
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,13 @@ | ||
import path = require('path'); | ||
import { TaskMockRunner } from 'azure-pipelines-task-lib/mock-run'; | ||
import * as answers from './answers'; | ||
|
||
const taskPath = path.join(__dirname, '..', 'publishtestresults.js'); | ||
const tr: TaskMockRunner = new TaskMockRunner(taskPath); | ||
|
||
tr.setInput('testRunner', 'JUnit'); | ||
tr.setInput('testResultsFiles', '/invalid/*pattern'); | ||
|
||
tr.setAnswers(answers.defaultAnswers); | ||
|
||
tr.run(); |
15 changes: 15 additions & 0 deletions
15
Tasks/PublishTestResultsV1/Tests/L0FilterMatchesSomeFile.ts
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,15 @@ | ||
import path = require('path'); | ||
import { TaskMockRunner } from 'azure-pipelines-task-lib/mock-run'; | ||
import * as answers from './answers'; | ||
|
||
const taskPath = path.join(__dirname, '..', 'publishtestresults.js'); | ||
const tr: TaskMockRunner = new TaskMockRunner(taskPath); | ||
|
||
let pattern = path.join(__dirname, 'data', '*.log'); | ||
tr.setInput('testRunner', 'JUnit'); | ||
tr.setInput('testResultsFiles', pattern); | ||
tr.setInput('mergeTestResults', 'true'); | ||
|
||
tr.setAnswers(answers.defaultAnswers); | ||
|
||
tr.run(); |
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,12 @@ | ||
import path = require('path'); | ||
import { TaskMockRunner } from 'azure-pipelines-task-lib/mock-run'; | ||
import * as answers from './answers'; | ||
|
||
const taskPath = path.join(__dirname, '..', 'publishtestresults.js'); | ||
const tr: TaskMockRunner = new TaskMockRunner(taskPath); | ||
|
||
tr.setInput('testRunner', 'Junit'); | ||
|
||
tr.setAnswers(answers.defaultAnswers); | ||
|
||
tr.run(); |
15 changes: 15 additions & 0 deletions
15
Tasks/PublishTestResultsV1/Tests/L0ResultFilesAsFilePath.ts
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,15 @@ | ||
import path = require('path'); | ||
import { TaskMockRunner } from 'azure-pipelines-task-lib/mock-run'; | ||
import * as answers from './answers'; | ||
|
||
const taskPath = path.join(__dirname, '..', 'publishtestresults.js'); | ||
const tr: TaskMockRunner = new TaskMockRunner(taskPath); | ||
|
||
let pattern = path.join(__dirname, 'data', 'a.log'); | ||
|
||
tr.setInput('testRunner', 'JUnit'); | ||
tr.setInput('testResultsFiles', pattern); | ||
|
||
tr.setAnswers(answers.defaultAnswers); | ||
|
||
tr.run(); |
13 changes: 13 additions & 0 deletions
13
Tasks/PublishTestResultsV1/Tests/L0TestRunnerTypeIsNotProvided.ts
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,13 @@ | ||
import path = require('path'); | ||
import { TaskMockRunner } from 'azure-pipelines-task-lib/mock-run'; | ||
import * as answers from './answers'; | ||
|
||
const taskPath = path.join(__dirname, '..', 'publishtestresults.js'); | ||
const tr: TaskMockRunner = new TaskMockRunner(taskPath); | ||
|
||
let pattern = path.join(__dirname, 'data', 'a.log'); | ||
tr.setInput('testResultsFiles', pattern); | ||
|
||
tr.setAnswers(answers.defaultAnswers); | ||
|
||
tr.run(); |
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
Oops, something went wrong.