Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Altinity/clickhouse-regression
Browse files Browse the repository at this point in the history
  • Loading branch information
alsugiliazova committed Nov 11, 2024
2 parents a1f9d2c + 10d72fd commit a5791f9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ssl_server/tests/check_certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,9 @@ def system_certificates(self):

for retry in retries(timeout=60, delay=1):
with retry:
with When("I get the serial number of my certificate"):
serial_number = node.command(
f"openssl x509 -text -in /etc/ssl/certs/{current().context.my_own_ca_crt.split('/')[-1]}.pem -serial | grep serial= --color=never"
).output[7:]

with Then("I check that system.certificates has the serial number"):
with Then("I check that system.certificates has the ca certificate"):
output = node.query(
f"SELECT count() FROM system.certificates WHERE serial_number = '{serial_number.lower()}' FORMAT TabSeparated"
f"SELECT count() FROM system.certificates WHERE issuer like '%Altinity%' FORMAT TabSeparated"
).output
assert output == "1", error()

Expand Down

0 comments on commit a5791f9

Please sign in to comment.