diff --git a/config/settings.local.yaml.tpl b/config/settings.local.yaml.tpl index cc74921d..2823e738 100644 --- a/config/settings.local.yaml.tpl +++ b/config/settings.local.yaml.tpl @@ -1,5 +1,6 @@ #default: # skip_cleanup: false +# tester: "someuser" # Optional: name of the user, who is running the tests, defaults to whoami/uid # gateway_api: true # True, if Testsuite should test with Gateway API enabled (e.g. Full Kuadrant) or individual components (e.g. Authorino) # cluster: # Workload cluster where tests should run, will get overriden if run on Multicluster # project: "kuadrant" # Optional: Default namespace for this cluster diff --git a/testsuite/utils.py b/testsuite/utils.py index e11042fd..f599b6cc 100644 --- a/testsuite/utils.py +++ b/testsuite/utils.py @@ -3,6 +3,7 @@ import enum import json import os +import getpass import secrets from collections.abc import Collection from copy import deepcopy @@ -48,7 +49,7 @@ def _whoami(): return settings["tester"] try: - return os.getlogin() + return getpass.getuser() # want to catch broad exception and fallback at any circumstance # pylint: disable=broad-except except Exception: