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

tests: Address incorrect built-in function check #1129

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

charlieegan3
Copy link
Member

After seeing https://github.com/StyraInc/regal/actions/runs/10996729351/job/30530568473, I had another look at this one. I spotted the built-in is incorrect here, I think? Not thinking this is the main fix, but this should log to make it clear when we see the next failure.

Signed-off-by: Charlie Egan <charlie@styra.com>
bis := rego.GetBuiltins()

// Search for a builtin we know is only in the EOPA capabilities.
if _, ok := bis["startswith"]; ok {
if _, ok := bis["neo4j.query"]; ok {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the main update.

timeout = time.NewTimer(defaultTimeout)
defer timeout.Stop()

ticker := time.NewTicker(100 * time.Millisecond)
Copy link
Member Author

Choose a reason for hiding this comment

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

Using a ticker is just for consistency with the below check

@charlieegan3
Copy link
Member Author

Hmm, TestGetInlayHintsAstCall... I hadn't seen that in a while... Will merge for now and see about this one tomorrow.

@anderseknert
Copy link
Member

Haven't heard that name in years!

@charlieegan3 charlieegan3 merged commit 4aa2fef into StyraInc:main Sep 23, 2024
4 checks passed
@charlieegan3 charlieegan3 deleted the correct-eopa-wait branch September 23, 2024 17:26
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Sep 24, 2024
Built ins must now be provided by the caller.

We have been having a number of issues where the shared list of builtins
was required to be in a different state in different tests.

Related
StyraInc#1101
StyraInc#1102
StyraInc#1112
StyraInc#1121
StyraInc#1129

Signed-off-by: Charlie Egan <charlie@styra.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Sep 24, 2024
Built ins must now be provided by the caller.

We have been having a number of issues where the shared list of builtins
was required to be in a different state in different tests.

Related
StyraInc#1101
StyraInc#1102
StyraInc#1112
StyraInc#1121
StyraInc#1129

Signed-off-by: Charlie Egan <charlie@styra.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Sep 24, 2024
Built ins must now be provided by the caller.

We have been having a number of issues where the shared list of builtins
was required to be in a different state in different tests.

Related
StyraInc#1101
StyraInc#1102
StyraInc#1112
StyraInc#1121
StyraInc#1129

Signed-off-by: Charlie Egan <charlie@styra.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Sep 24, 2024
Built ins must now be provided by the caller.

We have been having a number of issues where the shared list of builtins
was required to be in a different state in different tests.

Related
StyraInc#1101
StyraInc#1102
StyraInc#1112
StyraInc#1121
StyraInc#1129

Signed-off-by: Charlie Egan <charlie@styra.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Sep 24, 2024
Built ins must now be provided by the caller.

We have been having a number of issues where the shared list of builtins
was required to be in a different state in different tests.

Related
StyraInc#1101
StyraInc#1102
StyraInc#1112
StyraInc#1121
StyraInc#1129

Signed-off-by: Charlie Egan <charlie@styra.com>
anderseknert pushed a commit that referenced this pull request Sep 24, 2024
Built ins must now be provided by the caller.

We have been having a number of issues where the shared list of builtins
was required to be in a different state in different tests.

Related
#1101
#1102
#1112
#1121
#1129

Signed-off-by: Charlie Egan <charlie@styra.com>
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
Signed-off-by: Charlie Egan <charlie@styra.com>
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
Built ins must now be provided by the caller.

We have been having a number of issues where the shared list of builtins
was required to be in a different state in different tests.

Related
StyraInc#1101
StyraInc#1102
StyraInc#1112
StyraInc#1121
StyraInc#1129

Signed-off-by: Charlie Egan <charlie@styra.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Jan 6, 2025
Signed-off-by: Charlie Egan <charlie@styra.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Jan 6, 2025
Built ins must now be provided by the caller.

We have been having a number of issues where the shared list of builtins
was required to be in a different state in different tests.

Related
StyraInc#1101
StyraInc#1102
StyraInc#1112
StyraInc#1121
StyraInc#1129

Signed-off-by: Charlie Egan <charlie@styra.com>
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