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(ci): cleanup kong before running test suite (a spec file) #12567

Closed
wants to merge 1 commit into from

Conversation

bungle
Copy link
Member

@bungle bungle commented Feb 15, 2024

Summary

Cleanup Kong before running the test suite (a spec file).

KAG-3735

@bungle bungle force-pushed the ci/clean-prefix branch 3 times, most recently from d134cee to b39ef16 Compare February 15, 2024 11:03
@bungle bungle force-pushed the ci/clean-prefix branch 2 times, most recently from 8f99845 to 9a2ed78 Compare February 15, 2024 11:08
@bungle bungle marked this pull request as ready for review February 15, 2024 11:08
@bungle bungle changed the title chore(ci): clean prefix before running tests chore(ci): clean kong before running tests Feb 15, 2024
@bungle bungle changed the title chore(ci): clean kong before running tests chore(ci): cleanup kong before running test suite (a spec file) Feb 15, 2024
spec/busted-ci-helper.lua Outdated Show resolved Hide resolved
@bungle bungle force-pushed the ci/clean-prefix branch 2 times, most recently from 7e92cbd to 9c89854 Compare February 20, 2024 07:09
@bungle bungle force-pushed the ci/clean-prefix branch 2 times, most recently from 9ee6959 to 20b47ac Compare March 5, 2024 11:51
@bungle bungle added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Mar 5, 2024
### Summary

Cleanup Kong before running the test suite (a spec file).

Signed-off-by: Aapo Talvensaari <aapo.talvensaari@gmail.com>
local cjson = require 'cjson'
local socket_unix = require 'socket.unix'
local function cleanup()
local prefix = assert(require("kong.conf_loader")(os.getenv("KONG_SPEC_TEST_CONF_PATH") or "spec/kong_tests.conf")).prefix
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that only one prefix directory is being deleted here. However, if there are tests like spec-ee/02-integration/03-vitals/08-hybrid_spec.lua that create multiple prefix paths, how can we clear all of them?

@AndyZhang0707
Copy link
Collaborator

PR review discussion: Have already implemented other solutions, close this one

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/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants