diff options
author | Michael Abel <75477722+abelikt@users.noreply.github.com> | 2022-01-26 11:47:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-26 11:47:04 +0100 |
commit | e0efe10f438a3f165d04d35eedb042ea848cb7de (patch) | |
tree | 2f37f7e31b9523458eee0863ba6f0675d3bd5d1a | |
parent | a4b57906c5737c616e699092386ec1c4126375c4 (diff) |
[#784] Switch to pysys 2.0
- Avoid project.username wich seems to be used internally
8 files changed, 9 insertions, 9 deletions
diff --git a/tests/PySys/environments/environment_c8y.py b/tests/PySys/environments/environment_c8y.py index 2fac8d70..721f28f1 100644 --- a/tests/PySys/environments/environment_c8y.py +++ b/tests/PySys/environments/environment_c8y.py @@ -198,7 +198,7 @@ class EnvironmentC8y(BaseTest): if self.project.tenant == "": self.abort( FAILED, "Cumulocity tenant ID is not set. Set with the env variable C8YTENANT") - if self.project.username == "": + if self.project.c8yusername == "": self.abort( FAILED, "Cumulocity tenant username is not set. Set with the env variable C8YUSERNAME") if self.project.c8ypass == "": @@ -252,7 +252,7 @@ class EnvironmentC8y(BaseTest): ) self.cumulocity = Cumulocity( - self.project.c8yurl, self.project.tenant, self.project.username, self.project.c8ypass, self.log) + self.project.c8yurl, self.project.tenant, self.project.c8yusername, self.project.c8ypass, self.log) def execute(self): self.log.debug("EnvironmentC8y Execute") diff --git a/tests/PySys/environments/environment_roundtrip_c8y.py b/tests/PySys/environments/environment_roundtrip_c8y.py index cf8ca93d..78d1e8e0 100644 --- a/tests/PySys/environments/environment_roundtrip_c8y.py +++ b/tests/PySys/environments/environment_roundtrip_c8y.py @@ -54,7 +54,7 @@ class Environment_roundtrip_c8y(EnvironmentC8y): "-pub", self.project.exampledir, "-u", - self.project.username, + self.project.c8yusername, "-t", self.project.tenant, "-id", diff --git a/tests/PySys/log_request_end_to_end/log_request_error_messages/run.py b/tests/PySys/log_request_end_to_end/log_request_error_messages/run.py index 7c749b9c..d0e68559 100644 --- a/tests/PySys/log_request_end_to_end/log_request_error_messages/run.py +++ b/tests/PySys/log_request_end_to_end/log_request_error_messages/run.py @@ -71,7 +71,7 @@ class LogRequestVerifySearchTextError(EnvironmentC8y): def download_file_and_verify_error_messages(self, url): get_response = requests.get(url, auth=( - self.project.username, self.project.c8ypass), stream=False) + self.project.c8yusername, self.project.c8ypass), stream=False) nlines = get_response.content.decode('utf-8') return sum([1 if line.startswith("Error") else 0 for line in nlines.split("\n")]) == 25 diff --git a/tests/PySys/log_request_end_to_end/log_request_num_lines/run.py b/tests/PySys/log_request_end_to_end/log_request_num_lines/run.py index 73e8238c..29c26e34 100644 --- a/tests/PySys/log_request_end_to_end/log_request_num_lines/run.py +++ b/tests/PySys/log_request_end_to_end/log_request_num_lines/run.py @@ -70,7 +70,7 @@ class LogRequestVerifyNumberOfLines(EnvironmentC8y): def download_file_and_verify_number_of_lines(self, url): get_response = requests.get(url, auth=( - self.project.username, self.project.c8ypass), stream=False) + self.project.c8yusername, self.project.c8ypass), stream=False) nlines = len(get_response.content.decode('utf-8').split('\n')[:-1]) self.log.info("nlines %s", nlines) diff --git a/tests/PySys/misc_features/valid_device_id/run.py b/tests/PySys/misc_features/valid_device_id/run.py index 79318d60..22544bf4 100644 --- a/tests/PySys/misc_features/valid_device_id/run.py +++ b/tests/PySys/misc_features/valid_device_id/run.py @@ -73,7 +73,7 @@ class ValidateValidDeviceId(BaseTest): environs={"C8YPASS":self.project.c8ypass}, command=self.sudo, arguments=["-E", self.tedge, "cert", "upload", - "c8y", "--user", self.project.username], + "c8y", "--user", self.project.c8yusername], stdouterr="cert_upload", ) diff --git a/tests/PySys/pysysproject.xml b/tests/PySys/pysysproject.xml index 8eef2e55..f06f94e8 100644 --- a/tests/PySys/pysysproject.xml +++ b/tests/PySys/pysysproject.xml @@ -7,7 +7,7 @@ <property name="tebasedir" value="${env.TEBASEDIR}" default="${testRootDir}/../.."/> <property name="exampledir" value="${env.EXAMPLEDIR}" default="${testRootDir}/../../ci"/> <property name="c8yurl" value="${env.C8YURL}" default=""/> - <property name="username" value="${env.C8YUSERNAME}" default=""/> + <property name="c8yusername" value="${env.C8YUSERNAME}" default=""/> <property name="c8ypass" value="${env.C8YPASS}" default=""/> <property name="tenant" value="${env.C8YTENANT}" default=""/> <property name="deviceid" value="${env.C8YDEVICEID}" default=""/> diff --git a/tests/PySys/software_management_end_to_end/environment_sm_management.py b/tests/PySys/software_management_end_to_end/environment_sm_management.py index 55e18819..ade9e4bb 100644 --- a/tests/PySys/software_management_end_to_end/environment_sm_management.py +++ b/tests/PySys/software_management_end_to_end/environment_sm_management.py @@ -128,7 +128,7 @@ class SoftwareManagement(EnvironmentC8y): self.addCleanupFunction(self.mysmcleanup) tenant = self.project.tenant - user = self.project.username + user = self.project.c8yusername password = self.project.c8ypass # TODO are we doing something wrong while requesting? diff --git a/tests/requirements.txt b/tests/requirements.txt index 7b620169..7b048482 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,4 @@ -pysys == 1.6.1 +pysys == 2.0 requests == 2.25.1 toml == 0.10.2 retry == 0.9.2 |