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

test(cmd): record ngx.time() before generating a cert #12306

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

flrgh
Copy link
Contributor

@flrgh flrgh commented Jan 9, 2024

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

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.

KAG-3464

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.
@flrgh flrgh added backport release/2.8.x cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Jan 9, 2024
@flrgh flrgh added this to the 3.6.0 milestone Jan 9, 2024
@AndyZhang0707 AndyZhang0707 merged commit b7a8361 into master Jan 9, 2024
55 checks passed
@AndyZhang0707 AndyZhang0707 deleted the test/hybrid-gen-cert-cmd branch January 9, 2024 06:18
github-actions bot pushed a commit that referenced this pull request Jan 9, 2024
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)
@team-gateway-bot
Copy link
Collaborator

Successfully created backport PR for release/2.8.x:

github-actions bot pushed a commit that referenced this pull request Jan 9, 2024
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)
@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

@team-gateway-bot
Copy link
Collaborator

Successfully created backport PR for release/3.2.x:

github-actions bot pushed a commit that referenced this pull request Jan 9, 2024
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)
@team-gateway-bot
Copy link
Collaborator

Successfully created backport PR for release/3.3.x:

github-actions bot pushed a commit that referenced this pull request Jan 9, 2024
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)
@team-gateway-bot
Copy link
Collaborator

Successfully created backport PR for release/3.4.x:

github-actions bot pushed a commit that referenced this pull request Jan 9, 2024
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)
@team-gateway-bot
Copy link
Collaborator

Successfully created backport PR for release/3.5.x:

flrgh added a commit that referenced this pull request Jan 9, 2024
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 added a commit that referenced this pull request Jan 9, 2024
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 added a commit that referenced this pull request Jan 9, 2024
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 added a commit that referenced this pull request Jan 9, 2024
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 added a commit that referenced this pull request Jan 9, 2024
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)
AndyZhang0707 pushed a commit that referenced this pull request Jun 21, 2024
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)
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.

5 participants