-
-
Notifications
You must be signed in to change notification settings - Fork 388
Cleanup func-test suite #3828
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
Merged
Merged
Cleanup func-test suite #3828
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
faea8c3
Cleanup func-test suite
fendor f7dc9ed
Remove unused config change
fendor 0d389a1
Move qualified import tests to hls-refactor-plugin
fendor 036772a
Add README for `func-test`
fendor cb2b380
Add fendor as CODEOWNER for `func-test` and `hls-test-utils`
fendor e85fd9e
Merge branch 'master' into enhance/overhaul-func-test
michaelpj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
plugins/hls-refactor-plugin/test/data/import-placement/ImportPostQualified.expected.hs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{-# LANGUAGE ImportQualifiedPost #-} | ||
{-# OPTIONS_GHC -Wprepositive-qualified-module #-} | ||
import Control.Monad qualified as Control | ||
main :: IO () | ||
main = Control.when True $ putStrLn "hello" |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
plugins/hls-refactor-plugin/test/data/import-placement/ImportQualified.expected.hs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import qualified Control.Monad as Control | ||
main :: IO () | ||
main = Control.when True $ putStrLn "hello" |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# The `func-test` test suite. | ||
|
||
This is the integration test suite for cross-plugin and cross-package features. | ||
|
||
Add integration tests to `func-test` only if they satisfy one or more of the following conditions: | ||
|
||
* It tests the interaction between more than one plugin. | ||
* For example, plugin A provides a Diagnostic that plugin B requires to provide a CodeAction. | ||
* However, it is also valid, and often preferable, to depend on the required plugin directly in plugin B's test suite. | ||
* It tests HLS specific LSP code. | ||
* For example, we test that config changes are appropriately propagated. | ||
* Note, this is slightly debatable, since the test could also be part of `ghcide`. | ||
* Non HLS specific LSP code may exist in HLS temporarily, but any LSP extensions should be upstreamed to `lsp`. | ||
* It tests features of the `haskell-language-server-wrapper` executable. | ||
* For example, argument parsing. | ||
* It tests features of the `haskell-language-server` executable. | ||
* For example, argument parsing. | ||
* It tests features provided by `hls-plugin-api` that require an integration test (i.e. a unit test doesn't suffice). | ||
* Example: Testing the Logger setup. | ||
|
||
If you think that a test that currently lives in `func-test` does not meet the conditions above, open a ticket for discussion or try to move the test to a better location. | ||
|
||
Note: `func-test` is a historical test suite. It was originally written for Haskell IDE Engine, which was merged with the `ghcide` project. | ||
The integration test-suite `func-test` (back then `unit-test` existed as well) was used to test all kinds of features provided by Haskell IDE Engine (HIE). | ||
When `ghcide` and HIE merged together, the integration test suite was vastly copied. | ||
HLS moved to a plugin-based architecture, which mainly entails that plugin tests are isolated in the respective plugin's test suite. | ||
Over time, `func-test` started to bit rot and wasn't maintained properly any more, since all new tests were added to the plugin or `ghcide` test suites. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that
hls-test-utils
has no codeowner, I am volunteering to take over the ownership.Additionally, added myself as codeowner for
func-test
. Mostly, to make sure my somewhat arbitrary guidance intest/README.md
cannot be further violated without me noticing.