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

Conversation

jpogran
Copy link
Contributor

@jpogran jpogran commented Apr 11, 2024

Organizes and adds the following tests:

  • Completions
    • Root document completion
    • Completion for a local module sources (prefix ./)
    • Completion for inputs of a local module
    • Completion of the variable name inside the tfvars file
  • Go to Definition
    • Go-to-definition on a local module source
    • Go-to-definition on a module input
    • Go-to-definition on a var.something reference
    • Go-to-definition on the variable name inside tfvars
  • References
    • Find module references
    • Find references on the variable block
  • Symbols
    • Basic symbol return
  • Hover
    • core schema provides docs
  • Code actions
    • formats the document

Migrate to vscode-cli

Removes the original test runner infrastructure and replaces it with vscode-cli, which is the new recommend testing approach. This helps simplify executing VS Code API tests and helps ensure terraform-ls is up and initialized before running tests.

Notes

We now have two test folders: src/test and test/specs, along with two fixtures folders: test/fixtures and testFixtures. This does not address combining them or moving them because the wdio tsconfig/npm packaging conflicts with the vscode ones.

@jpogran jpogran self-assigned this Apr 11, 2024
@jpogran jpogran force-pushed the update-testing branch 2 times, most recently from 83017e9 to 33b5092 Compare April 11, 2024 02:08
@jpogran jpogran changed the title Update testing Add end to end extension to language server testing Apr 11, 2024
@jpogran jpogran marked this pull request as ready for review April 11, 2024 19:01
@jpogran jpogran requested a review from a team as a code owner April 11, 2024 19:01
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good work ❤️ ! I think these integration tests will help us a lot in the future!

I added some suggestions on how to reduce the potential flakiness and how to bring back the mocha helpers.

.vscode-test.mjs Outdated Show resolved Hide resolved
src/test/helper.ts Outdated Show resolved Hide resolved
src/test/helper.ts Outdated Show resolved Hide resolved
src/test/integration/completion.test.ts Outdated Show resolved Hide resolved
src/test/integration/hover.test.ts Outdated Show resolved Hide resolved
@jpogran jpogran requested a review from dbanck April 12, 2024 14:38
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! :shipit:

@jpogran jpogran merged commit 2494e5d into main Apr 12, 2024
18 checks passed
@jpogran jpogran deleted the update-testing branch April 12, 2024 17:07
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants