Skip to content

Commit

Permalink
Fix error messages for UseDotNetV2 (#20225)
Browse files Browse the repository at this point in the history
* Fixed error messages

* Bumped task-lib version;

Replaced the mocker run method with the async version

* Replaced mockery

* Fake commit

* update after-build-check-tasks

---------

Author: Denis Nikulin (Akvelon Inc) <[email protected]>
  • Loading branch information
DenisRumyantsev authored Jul 30, 2024
1 parent 8c5dfd1 commit 2d8aa2c
Show file tree
Hide file tree
Showing 55 changed files with 3,231 additions and 2,144 deletions.
311 changes: 155 additions & 156 deletions Tasks/UseDotNetV2/Tests/L0.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Tasks/UseDotNetV2/Tests/globaljsonfetcherTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Buffer } from "buffer";
import { VersionInfo } from '../models';
import { Promise } from 'q';
import fs = require('fs');
var mockery = require('mockery');
var mockery = require('azure-pipelines-task-lib/lib-mocker');

const workingDir: string = "work/";
const validRootGlobalJson = workingDir + "global.json";
Expand Down
2 changes: 1 addition & 1 deletion Tasks/UseDotNetV2/Tests/usedotnetTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { VersionInfo } from '../models';
import { setFlagsFromString } from 'v8';
import fs = require('fs');

let mockery = require('mockery');
let mockery = require('azure-pipelines-task-lib/lib-mocker');
let osType = "win";

//setup mocks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as tl from 'azure-pipelines-task-lib/task';
import * as os from 'os';
import { toolrunner } from './mocks/mockedModels'
var mockery = require('mockery');
var mockery = require('azure-pipelines-task-lib/lib-mocker');

mockery.enable({
useCleanCache: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as tl from 'azure-pipelines-task-lib/task';
import * as os from 'os';
import { toolrunner } from './mocks/mockedModels'
var mockery = require('mockery');
var mockery = require('azure-pipelines-task-lib/lib-mocker');
var osType = "win";

mockery.enable({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
import * as tl from 'azure-pipelines-task-lib/task';
import { HttpClientResponse } from "./mocks/mockedModels"
var mockery = require('mockery');
var mockery = require('azure-pipelines-task-lib/lib-mocker');

mockery.enable({
useCleanCache: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";
import * as tl from 'azure-pipelines-task-lib/task';
import { HttpClientResponse } from "./mocks/mockedModels"
var mockery = require('mockery');
var mockery = require('azure-pipelines-task-lib/lib-mocker');

mockery.enable({
useCleanCache: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as os from 'os';
import { toolrunner } from './mocks/mockedModels'
import { Constants } from "../versionutilities";
import fs = require('fs');
var mockery = require('mockery');
var mockery = require('azure-pipelines-task-lib/lib-mocker');
var osType = "win";

const installationPath: string = "installationPath"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import * as tl from 'azure-pipelines-task-lib/task';
import * as path from 'path';
import { Constants } from "../versionutilities";
let mockery = require('mockery');
let mockery = require('azure-pipelines-task-lib/lib-mocker');

const version = "2.1.1";
const installationPath: string = "installationPath"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/UseDotNetV2/Tests/versionInstallerTests.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";
import * as tl from 'azure-pipelines-task-lib/task';
var mockery = require('mockery');
var mockery = require('azure-pipelines-task-lib/lib-mocker');
mockery.enable({
useCleanCache: true,
warnOnReplace: false,
Expand Down
Loading

0 comments on commit 2d8aa2c

Please sign in to comment.