Most of the Splunk Extension code depends on the vscode package which requires a running instance of vscode to work. This PR adds testing harnesses using @vscode/test-electron using these resources as guidance:
Functional tests: these import the code directly so that individual functions can be tested similar to unit tests but with a running instance of vscode
Acceptance tests: these actually install the packaged .vsix version of the Extension into running VSCode instance in the testing environment. Unfortunately I wasn't able to get a meaningful test working yet with this but it was quite a lot of work just getting the harness working across platforms so I thought it would still be useful to work off of moving forward.
Bugfixes
After adding functional tests this run actually uncovered a Windows Java installation bug
Fixed a Linux bug that could apply to any OS specifying a Java version of the format openjdk version "17.0.8.1" or similar
Fixed an issue with hardcoded java.exe being checked for Linux/Mac
Fixed an issue with installation continuing/looping due to functions not being returned after resolve()
Improved error messaging for common unauthenticated and endpoint-not-found scenarios
Bump LSP
Bumped the SPL2 language server to the latest version 2.0.375
Added testing
Most of the Splunk Extension code depends on the
vscode
package which requires a running instance of vscode to work. This PR adds testing harnesses using@vscode/test-electron
using these resources as guidance:Functional tests: these import the code directly so that individual functions can be tested similar to unit tests but with a running instance of vscode Acceptance tests: these actually install the packaged
.vsix
version of the Extension into running VSCode instance in the testing environment. Unfortunately I wasn't able to get a meaningful test working yet with this but it was quite a lot of work just getting the harness working across platforms so I thought it would still be useful to work off of moving forward.Bugfixes
openjdk version "17.0.8.1"
or similarjava.exe
being checked for Linux/Macresolve()
Bump LSP
2.0.375