Skip to content

lsp: Implement LSP opaTestProvider feature in language server#1888

Merged
charlieegan3 merged 3 commits intoopen-policy-agent:mainfrom
charlieegan3:server-testing
Feb 24, 2026
Merged

lsp: Implement LSP opaTestProvider feature in language server#1888
charlieegan3 merged 3 commits intoopen-policy-agent:mainfrom
charlieegan3:server-testing

Conversation

@charlieegan3
Copy link
Contributor

@charlieegan3 charlieegan3 commented Feb 23, 2026

Please see open-policy-agent/vscode-opa#408 for client implementation and video.

Draft until we get open-policy-agent/opa#8362 in as it's manually referenced atm.

@charlieegan3 charlieegan3 marked this pull request as draft February 23, 2026 17:45
@charlieegan3 charlieegan3 force-pushed the server-testing branch 3 times, most recently from 8f5db3f to 406e341 Compare February 24, 2026 11:39
@charlieegan3 charlieegan3 marked this pull request as ready for review February 24, 2026 11:40
@charlieegan3 charlieegan3 changed the title lsp: Implement opaTestProvider feature in server for running of opa tests over lsp lsp: Implement LP opaTestProvider feature in language server Feb 24, 2026
Copy link
Contributor

@srenatus srenatus left a comment

Choose a reason for hiding this comment

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

LGTM. Parameterized tests don't happen to "just work", do they? 🤔


[![Build Status](https://github.com/open-policy-agent/regal/workflows/Build/badge.svg)](https://github.com/open-policy-agent/regal/actions)
![OPA v1.13.1](https://www.openpolicyagent.org/badge/v1.13.1)
![OPA v1.13.1-0.20260224105757-9b2143cdf99c](https://www.openpolicyagent.org/badge/v1.13.1-0.20260224105757-9b2143cdf99c)
Copy link
Contributor

Choose a reason for hiding this comment

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

What do we need? Ah, the runtime bits. 💡

@charlieegan3
Copy link
Contributor Author

Parameterized tests don't happen to "just work", do they?

Afraid not yet, I need to dig a little deeper to understand how to reliably detect these.

There is also a bit of an issue where each test is run one after the other rather than all at once. I need to understand how to have 'test run all' return acceptable results to update the single test rule state.

@charlieegan3
Copy link
Contributor Author

That's the reason there is no test entire package / file, since the client does that.

Add test locations worker and notification system for LSP clients.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
Signed-off-by: Charlie Egan <charlie_egan@apple.com>
The clients are able to run all tests in file etc.

This make the impl more simple.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
@charlieegan3 charlieegan3 changed the title lsp: Implement LP opaTestProvider feature in language server lsp: Implement LSP opaTestProvider feature in language server Feb 24, 2026
@charlieegan3 charlieegan3 merged commit c97f88c into open-policy-agent:main Feb 24, 2026
8 checks passed
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 24, 2026
This was missed in open-policy-agent#1888

This makes test locations more similar to diagnostics.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 24, 2026
This was missed in open-policy-agent#1888

This makes test locations more similar to diagnostics.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 24, 2026
This was missed in open-policy-agent#1888

This makes test locations more similar to diagnostics.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 25, 2026
This was missed in open-policy-agent#1888

This makes test locations more similar to diagnostics.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit that referenced this pull request Feb 25, 2026
This was missed in #1888

This makes test locations more similar to diagnostics.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
@charlieegan3 charlieegan3 deleted the server-testing branch February 25, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants