Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Adding logs to debug test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Oct 24, 2016
1 parent 8d64d74 commit 9ea6a2b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ language: go

go:
- 1.5
- 1.6
- 1.7


sudo: false

os:
- osx
- linux

before_install:
Expand Down
16 changes: 13 additions & 3 deletions test/go.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { getGoVersion } from '../src/goInstallTools';
import { documentSymbols } from '../src/goOutline';
import { listPackages } from '../src/goImport';
import { generateTestCurrentFile, generateTestCurrentPackage } from '../src/goGenerateTests';
import { getBinPath } from '../src/goPath';
import { getBinPath, getGoRuntimePath } from '../src/goPath';
import { isVendorSupported } from '../src/goInstallTools';

suite('Go Extension Tests', () => {
Expand Down Expand Up @@ -188,7 +188,15 @@ encountered.
});

test('Test Generate unit tests squeleton for file', (done) => {
getGoVersion().then(version => {
let goRuntimePath = getGoRuntimePath();
let p1 = new Promise<void>((resolve, reject) => {
cp.execFile(goRuntimePath, ['version'], {}, (err, stdout, stderr) => {
console.log(`Version is: ${stdout}`);
});
});

let p2 = getGoVersion().then(version => {
console.log(`Major: ${version.major} Minor: ${version.minor}`);
if (version.major === 1 && version.minor === 5) {
// gotests is not supported in Go 1.5, so skip the test
return Promise.resolve();
Expand All @@ -206,7 +214,9 @@ encountered.
vscode.commands.executeCommand('workbench.action.closeActiveEditor');
return Promise.resolve();
});
}).then(() => done(), done);
});

Promise.all([p1, p2]).then(() => done(), done);
});

test('Test Generate unit tests squeleton for package', (done) => {
Expand Down

0 comments on commit 9ea6a2b

Please sign in to comment.