Skip to content

Commit

Permalink
tests(cmd): clean and prepare the prefix directory for each test case (
Browse files Browse the repository at this point in the history
…#13878)

This ensures that the prefix directory is reset to a known state after
other test runs (and in between individual test cases), fixing a
flakiness issue we've been seeing in CI:

> FAIL spec/02-integration/02-cmd/06-restart_spec.lua:23: kong restart restarts if not running
> spec/02-integration/02-cmd/06-restart_spec.lua:26: Error: in-memory storage can not be used when role = "control_plane"
>
>  Run with --v (verbose) or --vv (debug) for more details
  • Loading branch information
flrgh authored Nov 18, 2024
1 parent e32d1b0 commit bfc121b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/02-integration/02-cmd/06-restart_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ end
describe("kong restart", function()
lazy_setup(function()
helpers.get_db_utils(nil, {}) -- runs migrations
helpers.prepare_prefix()
end)
lazy_teardown(function()
helpers.clean_prefix()
end)
before_each(function()
helpers.clean_prefix()
helpers.prepare_prefix()
end)
after_each(function()
helpers.kill_all()
end)
Expand Down

1 comment on commit bfc121b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Bazel Build

Docker image available kong/kong:bfc121bfbb2bb810b2fadbc6dcdf9112aeda9684
Artifacts available https://github.com/Kong/kong/actions/runs/11884799146

Please sign in to comment.