Skip to content

Commit

Permalink
Remove redis-cli auth warnings in helm test logs (#8961)
Browse files Browse the repository at this point in the history
Removed warnings about unsafe authentication in Helm test logs
`DEBUG shared.fixtures.init:init.py:111 Output (stderr): Warning: Using
a password with '-a' or '-u' option on the command line interface may
not be safe.`
  • Loading branch information
zhiltsov-max authored Jan 20, 2025
1 parent d7f49ef commit fe5efaf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/python/shared/fixtures/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,10 @@ def kube_restore_redis_inmem():
[
"sh",
"-c",
'redis-cli -e -a "${REDIS_PASSWORD}" --scan --pattern "*" |'
'grep -v "' + r"\|".join(_get_redis_inmem_keys_to_keep()) + '" |'
'xargs -r redis-cli -e -a "${REDIS_PASSWORD}" del',
'export REDISCLI_AUTH="${REDIS_PASSWORD}" && '
'redis-cli -e --scan --pattern "*" | '
'grep -v "' + r"\|".join(_get_redis_inmem_keys_to_keep()) + '" | '
"xargs -r redis-cli -e del",
]
)

Expand All @@ -283,7 +284,7 @@ def docker_restore_redis_ondisk():

def kube_restore_redis_ondisk():
kube_exec_redis_ondisk(
["sh", "-c", 'redis-cli -e -p 6666 -a "${CVAT_REDIS_ONDISK_PASSWORD}" flushall']
["sh", "-c", 'REDISCLI_AUTH="${CVAT_REDIS_ONDISK_PASSWORD}" redis-cli -e -p 6666 flushall']
)


Expand Down

0 comments on commit fe5efaf

Please sign in to comment.