cscli: hide hashed api keys (#2874)

* cscli: hide hashed api keys
* lint
This commit is contained in:
mmetc 2024-03-06 14:27:05 +01:00 committed by GitHub
parent 5356ccc6cd
commit e611d01c90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 19 deletions

View file

@ -36,8 +36,6 @@ def test_register_bouncer_env(crowdsec, flavor):
bouncer1, bouncer2 = j
assert bouncer1['name'] == 'bouncer1name'
assert bouncer2['name'] == 'bouncer2name'
assert bouncer1['api_key'] == hex512('bouncer1key')
assert bouncer2['api_key'] == hex512('bouncer2key')
# add a second bouncer at runtime
res = cs.cont.exec_run('cscli bouncers add bouncer3name -k bouncer3key')
@ -48,7 +46,6 @@ def test_register_bouncer_env(crowdsec, flavor):
assert len(j) == 3
bouncer3 = j[2]
assert bouncer3['name'] == 'bouncer3name'
assert bouncer3['api_key'] == hex512('bouncer3key')
# remove all bouncers
res = cs.cont.exec_run('cscli bouncers delete bouncer1name bouncer2name bouncer3name')