Adding tests (#2)

* add tests

* fixing tests

* change names of it

* resolve comments

Co-authored-by: Dmitry Shibanov <v-dmshib@microsoft.com>
This commit is contained in:
Dmitry Shibanov 2020-06-24 19:58:01 +03:00 committed by GitHub
parent ddc76880cc
commit 60dce67d9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 205 additions and 59 deletions

5
dist/index.js vendored
View file

@ -4899,7 +4899,7 @@ module.exports = require("fs");
/***/ }),
/***/ 749:
/***/ (function(__unusedmodule, exports, __webpack_require__) {
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -4990,6 +4990,7 @@ function getGo(versionSpec, stable, auth) {
throw new Error(`Unable to find Go version '${versionSpec}' for platform ${osPlat} and architecture ${osArch}.`);
}
try {
console.log("Install from dist");
downloadPath = yield installGoVersion(info, undefined);
}
catch (err) {
@ -5067,7 +5068,7 @@ function findMatch(versionSpec, stable) {
let result;
let match;
const dlUrl = 'https://golang.org/dl/?mode=json&include=all';
let candidates = yield getVersionsDist(dlUrl);
let candidates = yield module.exports.getVersionsDist(dlUrl);
if (!candidates) {
throw new Error(`golang download url did not return results`);
}