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

chore(tests): make DB helpers imported on demand #13999

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StarlightIbuki
Copy link
Contributor

Summary

This decouples most of the helper functions from the database, making them available for env where no DB is provided

Issue reference

KAG-6002

@github-actions github-actions bot added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Dec 10, 2024
@StarlightIbuki StarlightIbuki force-pushed the tests/dbless-helpers branch 7 times, most recently from 9cfe2a8 to 9967050 Compare December 10, 2024 08:44
spec/helpers.lua Outdated
@@ -29,6 +29,10 @@ local client = reload_module("spec.internal.client")
local wait = reload_module("spec.internal.wait")


-- redo the patches to make kong PDK available to timerng timers
reload_module("kong.globalpatches")({ cli = true, rbusted = true, })
Copy link
Contributor

Choose a reason for hiding this comment

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

kong.globalpatches is not intended to be reloadable because of how many global things it overwrites. That's why most of the tests on this branch are failing with a stack overflow.

@@ -29,6 +29,10 @@ local client = reload_module("spec.internal.client")
local wait = reload_module("spec.internal.wait")


-- redo the patches to make kong PDK available to timerng timers
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you explain the context of "make kong PDK available to timerng timers", I don't quite get it.

This makes cmd helpers function available for env where no DB provided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee size/S skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants