Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add end to end extension to language server testing #1739

Merged
merged 13 commits into from
Apr 12, 2024
Merged
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
uses: hashicorp/setup-terraform@v3
with:
terraform_wrapper: false
terraform_version: '~1.6'
terraform_version: '~1.7'
- name: Terraform version
run: terraform version
- name: Clean Install Dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ npm-debug.log
lsp/
testFixture/.terraform.lock.hcl
testFixture/.vscode
test/fixtures/.vscode
.terraform/
.vscode-test-web
.wdio-vscode-service
30 changes: 30 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/

import { defineConfig } from '@vscode/test-cli';
// import { apiClient, tokenPluginId } from './src/terraformCloud';
// import { server } from './src/test/integration/mocks/server';

const config = defineConfig({
version: process.env['VSCODE_VERSION'] ?? 'stable',
workspaceFolder: process.env['VSCODE_WORKSPACE_FOLDER'] ?? './test/fixtures',
launchArgs: ['--disable-extensions', '--disable-workspace-trust'],
files: 'out/test/**/*.test.js',
mocha: {
ui: 'tdd',
color: true,
timeout: 100000,
},
});

// how to do this?
jpogran marked this conversation as resolved.
Show resolved Hide resolved
// config.mocha.globalSetup = () => {
// apiClient.eject(tokenPluginId);

// server.listen();
// };
// config.mocha.globalTeardown = () => server.close();

export default config;
3 changes: 2 additions & 1 deletion build/downloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ const lsTarget = process.env.ls_target;
if (lsTarget !== undefined) {
const tgt = lsTarget.split('_');
os = tgt[0];
arch = tgt[1];

arch = tgt[1] as NodeJS.Architecture;
}

run(os, arch);
Loading
Loading