Update an expired test certificate
What does this MR do and why?
Contributes to gitlab-org/quality/engineering-productivity/master-broken-incidents#6747 (closed)
Problem
The previous certificate that was used in tests got expired. As a result tests started failing with "tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2024-06-07T06:16:03Z is after 2024-06-07T04:31:24Z"
Solution
Reissue a certificate with an expiration date "Aug 24 09:26:29 2032 GMT"
How to verify
cd workhorse/cmd/gitlab-workhorse
go test -v -run='TestNewListener|TestNewListener_TLS' .
Before
=== RUN TestNewListener
=== RUN TestNewListener/tcp+127.0.0.1:0
time="2024-06-07T11:34:57+02:00" level=info msg="Running test server" address="127.0.0.1:0" network=tcp
=== RUN TestNewListener/unix+../../testdata/sock
time="2024-06-07T11:34:57+02:00" level=info msg="Running test server" address=../../testdata/sock network=unix
--- PASS: TestNewListener (0.00s)
--- PASS: TestNewListener/tcp+127.0.0.1:0 (0.00s)
--- PASS: TestNewListener/unix+../../testdata/sock (0.00s)
=== RUN TestNewListener_TLS
time="2024-06-07T11:34:57+02:00" level=info msg="Running test server with tls" address="127.0.0.1:0" network=tcp
listener_test.go:90:
Error Trace: /Users/vasya/projects/gitlab-development-kit/gitlab/workhorse/cmd/gitlab-workhorse/listener_test.go:90
Error: Received unexpected error:
tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2024-06-07T11:34:57+02:00 is after 2024-06-07T04:31:24Z
Test: TestNewListener_TLS
--- FAIL: TestNewListener_TLS (0.00s)
FAIL
FAIL gitlab.com/gitlab-org/gitlab/workhorse/cmd/gitlab-workhorse 0.661s
FAIL
After
=== RUN TestNewListener
=== RUN TestNewListener/tcp+127.0.0.1:0
time="2024-06-07T11:35:49+02:00" level=info msg="Running test server" address="127.0.0.1:0" network=tcp
=== RUN TestNewListener/unix+../../testdata/sock
time="2024-06-07T11:35:49+02:00" level=info msg="Running test server" address=../../testdata/sock network=unix
--- PASS: TestNewListener (0.00s)
--- PASS: TestNewListener/tcp+127.0.0.1:0 (0.00s)
--- PASS: TestNewListener/unix+../../testdata/sock (0.00s)
=== RUN TestNewListener_TLS
time="2024-06-07T11:35:49+02:00" level=info msg="Running test server with tls" address="127.0.0.1:0" network=tcp
--- PASS: TestNewListener_TLS (0.00s)
PASS
ok gitlab.com/gitlab-org/gitlab/workhorse/cmd/gitlab-workhorse 0.425s
Edited by Vasilii Iakliushin