Merge pull request #494 from jcreedcmu/jcreed/fix-integration-tests

Remove failing integration test
This commit is contained in:
jcreedcmu
2020-07-10 11:06:41 -04:00
committed by GitHub
3 changed files with 14 additions and 19 deletions

View File

@@ -50,14 +50,6 @@ export function fileUriToWebviewUri(
return panel.webview.asWebviewUri(fileUriOnDisk).toString();
}
/** Converts a URI string received from a webview into a local filesystem URI for the same resource. */
export function webviewUriToFileUri(webviewUri: string): Uri {
// Webview URIs used the vscode-resource scheme. The filesystem path of the resource can be obtained from the path component of the webview URI.
const path = Uri.parse(webviewUri).path;
// For this path to be interpreted on the filesystem, we need to parse it as a filesystem URI for the current platform.
return Uri.file(path);
}
/**
* Resolves the specified CodeQL location to a URI into the source archive.
* @param loc CodeQL location to resolve. Must have a non-empty value for `loc.file`.

View File

@@ -6,7 +6,6 @@ import * as tmp from 'tmp';
import { window, ViewColumn, Uri } from 'vscode';
import {
fileUriToWebviewUri,
webviewUriToFileUri,
tryResolveLocation,
} from '../../interface-utils';
import { getDefaultResultSetName } from '../../interface-types';
@@ -47,15 +46,6 @@ describe('interface-utils', () => {
};
}
it('should correctly round trip from filesystem to webview and back', function() {
const { fileUriOnDisk, panel } = setupWebview('');
const webviewUri = fileUriToWebviewUri(panel, fileUriOnDisk);
const reconstructedFileUri = webviewUriToFileUri(webviewUri);
expect(reconstructedFileUri.toString(true)).to.equal(
fileUriOnDisk.toString(true)
);
});
it('does not double-encode # in URIs', function() {
const { fileUriOnDisk, panel } = setupWebview('#');
const webviewUri = fileUriToWebviewUri(panel, fileUriOnDisk);

View File

@@ -9,8 +9,19 @@ type Suite = {
extensionDevelopmentPath: string;
extensionTestsPath: string;
launchArgs: string[];
version?: string;
};
// Which version of vscode to test against. Can set to 'stable' or
// 'insiders' or an explicit version number. See runTest.d.ts in
// vscode-test for more details.
// For CI purposes we want to leave this at 'stable' to catch any bugs
// that might show up with new vscode versions released, even though
// this makes testing not-quite-pure, but it can be changed for local
// testing against old versions if necessary.
const VSCODE_VERSION = 'stable';
/**
* Run an integration test suite `suite`, retrying if it segfaults, at
* most `tries` times.
@@ -53,15 +64,17 @@ async function main() {
// List of integration test suites.
// The path to the extension test runner script is passed to --extensionTestsPath.
const integrationTestSuites = [
const integrationTestSuites: Suite[] = [
// Tests with no workspace selected upon launch.
{
version: VSCODE_VERSION,
extensionDevelopmentPath: extensionDevelopmentPath,
extensionTestsPath: path.resolve(__dirname, 'no-workspace', 'index'),
launchArgs: ['--disable-extensions'],
},
// Tests with a simple workspace selected upon launch.
{
version: VSCODE_VERSION,
extensionDevelopmentPath: extensionDevelopmentPath,
extensionTestsPath: path.resolve(__dirname, 'minimal-workspace', 'index'),
launchArgs: [