Fix: MySQL integration tests don't need to verify CA (#98857)

* Fix: MySQL integration tests don't need to verify CA

The _better_ solution here is to use our own, custom CA certificate. But there is also no real problem in risking a MITM
attack here as it's just test code, with no sensitive data, and it's ran on our own infra (so if we have a MITM problem,
we have even bigger issues...).

* Chore: make drone

* Chore: buildifier format
This commit is contained in:
Mariell Hoversholm
2025-01-13 15:40:19 +01:00
committed by GitHub
parent 4aa29c79a4
commit e754ea7a64
2 changed files with 15 additions and 15 deletions
+13 -13
View File
@@ -1155,9 +1155,9 @@ steps:
name: wait-for-mysql-8.0
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql80 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql80 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -2650,9 +2650,9 @@ steps:
name: wait-for-mysql-8.0
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql80 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql80 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -3198,9 +3198,9 @@ steps:
name: wait-for-mysql-8.0
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql80 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql80 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -4908,9 +4908,9 @@ steps:
name: wait-for-mysql-8.0
- commands:
- apk add --update build-base
- apk add --update mysql-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h mysql80 -P 3306 -u root
-prootpass
- apk add --update mariadb-client
- cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h mysql80 -P 3306 -u
root -prootpass --disable-ssl-verify-server-cert
- go clean -testcache
- go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find
./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+'
@@ -5579,6 +5579,6 @@ kind: secret
name: gcr_credentials
---
kind: signature
hmac: 341dbe9d2f9c6d2ee70026e495921ea4670550729350047ec0c680094497cc44
hmac: 9f0a6d29cd6f5e368fb6d63f26ab213d668ac099e3b8e653dbf4b074e7ef0a1a
...
+2 -2
View File
@@ -1075,8 +1075,8 @@ def postgres_integration_tests_steps():
def mysql_integration_tests_steps(hostname, version):
cmds = [
"apk add --update mysql-client",
"cat devenv/docker/blocks/mysql_tests/setup.sql | mysql -h {} -P 3306 -u root -prootpass".format(hostname),
"apk add --update mariadb-client", # alpine doesn't package mysql anymore; more info: https://wiki.alpinelinux.org/wiki/MySQL
"cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h {} -P 3306 -u root -prootpass --disable-ssl-verify-server-cert".format(hostname),
"go clean -testcache",
"go test -p=1 -count=1 -covermode=atomic -timeout=5m -run '^TestIntegration' $(find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\\(.*\\)/' | sort -u)",
]