more verbose version names
This commit is contained in:
parent
da81d22323
commit
2df16771d7
1 changed files with 11 additions and 6 deletions
|
@ -33,18 +33,23 @@ except Exception as ex:
|
||||||
sys.exit('kubectl not installed')
|
sys.exit('kubectl not installed')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
installed_version = installed_version_info['clientVersion']['gitVersion']
|
||||||
# NOT Match
|
# NOT Match
|
||||||
if version_to_check[0] == '!':
|
if version_to_check[0] == '!':
|
||||||
version_to_check = version_to_check[1:]
|
undesired_version = version_to_check[1:]
|
||||||
print(f'checking NOT version: {version_to_check}')
|
print(f'undesired version: {undesired_version}')
|
||||||
if installed_version_info['clientVersion']['gitVersion'] == version_to_check:
|
if installed_version == undesired_version:
|
||||||
|
print(
|
||||||
|
f'installed version ({installed_version}) matches undesire {undesired_version} - FAIL')
|
||||||
PASSED = False
|
PASSED = False
|
||||||
# Exact Match
|
# Exact Match
|
||||||
else:
|
else:
|
||||||
if version_to_check == 'latest':
|
if version_to_check == 'latest':
|
||||||
version_to_check = get_latest_version()
|
desired_version = get_latest_version()
|
||||||
print(f'version_to_check: {version_to_check}')
|
print(f'desired version: {desired_version}')
|
||||||
if installed_version_info['clientVersion']['gitVersion'] != version_to_check:
|
if installed_version != desired_version:
|
||||||
|
print(
|
||||||
|
f'installed version ({installed_version}) does not match desired ({desired_version}) - FAIL')
|
||||||
PASSED = False
|
PASSED = False
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
print(f'Exception: {ex}')
|
print(f'Exception: {ex}')
|
||||||
|
|
Loading…
Add table
Reference in a new issue