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

[backport -> release/3.3.x] test(cmd): record ngx.time() before generating a cert #12310

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

team-gateway-bot
Copy link
Collaborator

Automated backport to release/3.3.x, triggered by a label in #12306.

Several of these tests contained the following assertion after generating
a certificate with the `kong hybrid gen_cert` command:

```lua
assert(crt:get_not_before() >= ngx.time())
```

This produces failures every now and again when the clock has advanced
_just_ enough for ngx.time() to return `crt:get_not_before() + 1`. To
fix this, we record the time _before_ generating the cert and validate
against the stored timestamp.

(cherry picked from commit b7a8361)
@flrgh flrgh merged commit 32e2496 into release/3.3.x Jan 9, 2024
29 checks passed
@flrgh flrgh deleted the backport-12306-to-release/3.3.x branch January 9, 2024 16:11
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/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants