Skip to content

Commit

Permalink
tests: verify custom certs are stored correctly
Browse files Browse the repository at this point in the history
Ensure that certificates are stored in Redis using base64 encoding.
  • Loading branch information
Amygos committed Sep 13, 2024
1 parent 95b3a6c commit 80c6077
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/20_traefik_certificates_api.robot
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ Upload a custom certificate
Should Be Equal As Integers ${response} 1
${response} = Execute Command redis-cli --raw HGET module/traefik1/certificate/test.example.com custom
Should Be Equal As Strings ${response} true
Execute Command redis-cli HGET module/traefik1/certificate/test.example.com cert | base64 -d > /dev/null
Execute Command redis-cli HGET module/traefik1/certificate/test.example.com key | base64 -d > /dev/null
# check if the certificate stored is base64 encoded
${response} = Execute Command redis-cli HGET module/traefik1/certificate/test.example.com cert | base64 -d > /dev/null return_stdout=False return_rc=True
Should Be Equal As Integers ${response} 0
${response} = Execute Command redis-cli HGET module/traefik1/certificate/test.example.com key | base64 -d > /dev/null return_stdout=False return_rc=True
Should Be Equal As Integers ${response} 0

Delete custom certificate
Run task module/traefik1/delete-certificate {"fqdn": "test.example.com"}
Expand Down

0 comments on commit 80c6077

Please sign in to comment.