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

Code Action Testing #828

Merged
merged 1 commit into from
Nov 5, 2021
Merged

Code Action Testing #828

merged 1 commit into from
Nov 5, 2021

Conversation

jpogran
Copy link
Contributor

@jpogran jpogran commented Oct 27, 2021

Add tests for the code actions added in hashicorp/terraform-ls#680.

Moves the tests to the suite folder and separates them from the test harness files.

Removes the activate method, which reduces overall test time by ~20-30 seconds. The activate method isn't needed because the extension is started in the testFixture folder, which has Terraform files that will trigger activation using our existing activationEvents. This method also slept for 8000ms, which isn't necessary with recent LS releases.

Needs hashicorp/terraform-ls#680 to merge

@jpogran jpogran self-assigned this Oct 27, 2021
@jpogran jpogran requested a review from a team October 27, 2021 13:08
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

This is great, thank you for adding these tests and for reducing the test time! 💯

src/test/helper.ts Outdated Show resolved Hide resolved
src/test/helper.ts Outdated Show resolved Hide resolved
@jpogran jpogran force-pushed the code-action-testing branch from ada78b6 to f525099 Compare November 3, 2021 15:21
@jpogran jpogran marked this pull request as ready for review November 3, 2021 15:24
@jpogran jpogran force-pushed the code-action-testing branch 3 times, most recently from be55045 to fd66c2b Compare November 3, 2021 15:29
@jpogran jpogran mentioned this pull request Nov 4, 2021
radeksimko
radeksimko previously approved these changes Nov 4, 2021
Standardize test runner by extracting duplicated invocation information and seperating the execution of terraform from the individual extension tests.

Move integration tests to dedicated folder called `integration`. This organizes the tests and will allow UI specific tests in the future to be seperate from integration or unit tests.

Remove explicit activation of extension and pausing to give time for extension to activate. This is already accomplished by our eactivation events.

Add mocha chai library and update tests to properly teardown after execution.

Add code action and completion tests to round out initial set of integration tests.
@jpogran jpogran merged commit 2a7b93e into main Nov 5, 2021
@jpogran jpogran deleted the code-action-testing branch November 5, 2021 00:21
@github-actions
Copy link

github-actions bot commented Dec 5, 2021

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 Dec 5, 2021
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