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 bb710df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/20_traefik_certificates_api.robot
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ 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
# 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


Execute Command redis-cli HGET module/traefik1/certificate/test.example.com key | base64 -d > /dev/null

Delete custom certificate
Expand Down

0 comments on commit bb710df

Please sign in to comment.