Loading tests/features/Helper/helper.robot +946 −1 File changed.Preview size limit exceeded, changes collapsed. Show changes tests/libraries/common/bodyRequests.py +8 −5 Original line number Original line Diff line number Diff line Loading @@ -11,29 +11,32 @@ def check_variable(input, data_type): print(input) print(input) print(type(input)) print(type(input)) print(data_type) print(data_type) allowed_types = [t.strip() for t in data_type.split("|")] if "None" in allowed_types and input is None: return True if isinstance(input, list): if isinstance(input, list): for one in input: for one in input: check_variable(one, data_type) check_variable(one, data_type) return True return True if data_type == "string": if "string" in allowed_types: if isinstance(input, str): if isinstance(input, str): return True return True else: else: raise Exception("variable is not string type") raise Exception("variable is not string type") elif data_type == "integer": elif "integer" in allowed_types: if isinstance(input, int): if isinstance(input, int): return True return True else: else: raise Exception("variable is not integer type") raise Exception("variable is not integer type") elif data_type == "boolean": elif "boolean" in allowed_types: if isinstance(input, boolean): if isinstance(input, boolean): return True return True else: else: raise Exception("variable is not integer type") raise Exception("variable is not integer type") elif data_type == "URI": elif "URI" in allowed_types: check_uri(input, data_type) check_uri(input, data_type) return True return True elif data_type == "URI_reference": elif "URI_reference" in allowed_types: check_uri(input, data_type) check_uri(input, data_type) return True return True elif data_type not in capif_types.keys(): elif data_type not in capif_types.keys(): Loading tests/libraries/common/types.json +91 −1 Original line number Original line Diff line number Diff line Loading @@ -729,6 +729,96 @@ "startTime": "string", "startTime": "string", "stopTime": "string" "stopTime": "string" } } }, "InvokersResponse": { "mandatory_attributes": {}, "optional_attributes": { "invokers": "InvokersResponseAPIInvokerEnrolmentDetails", "long": "integer", "sortOrder": "string | None", "total": "integer", "totalPages": "integer", "message": "string" } }, "InvokersResponseAPIInvokerEnrolmentDetails": { "mandatory_attributes": { "api_invoker_id": "string", "onboarding_information": "InvokersResponseOnboardingInformation", "api_invoker_information": "string", "notification_destination": "URI", "uuid": "string" }, "optional_attributes": { "request_test_notification": "boolean", "websock_notif_config": "InvokersResponseWebsockNotifConfig", "api_invoker_information": "string", "supported_features": "SupportedFeatures", "api_list": "ServiceAPIDescription | None", "exp_time": "string | None", "onboarding_date": "string", "username": "string", "api_invoker_certificate": "string" } }, "InvokersResponseOnboardingInformation": { "mandatory_attributes": { "api_invoker_public_key": "string" }, "optional_attributes": { "api_invoker_certificate": "string", "onboarding_secret": "string" } }, "InvokersResponseWebsockNotifConfig": { "mandatory_attributes": {}, "optional_attributes": { "websocket_uri": "URI_reference", "request_websocket_uri": "boolean" } }, "ProvidersResponse": { "mandatory_attributes": {}, "optional_attributes": { "providers": "ProvidersResponseAPIProviderEnrolmentDetails", "long": "integer", "sortOrder": "string | None", "total": "integer", "totalPages": "integer", "message": "string" } }, "ProvidersResponseAPIProviderEnrolmentDetails": { "mandatory_attributes": { "reg_sec": "string", "api_prov_dom_id": "string" }, "optional_attributes": { "api_prov_funcs": "ProvidersResponseAPIProviderFunctionDetails", "api_prov_dom_info": "string", "supp_feat": "SupportedFeatures", "fail_reason": "string", "api_prov_name": "string | None", "onboarding_date": "string", "username": "string", "uuid": "string" } }, "ProvidersResponseAPIProviderFunctionDetails": { "mandatory_attributes": { "reg_info": "ProvidersResponseRegistrationInformation", "api_prov_func_role": "ApiProviderFuncRole", "api_prov_func_id": "string" }, "optional_attributes": { "api_prov_func_info": "string" } }, "ProvidersResponseRegistrationInformation": { "mandatory_attributes": { "api_prov_pub_key": "string", "api_prov_cert": "string" }, "optional_attributes": {} } } } } tests/resources/common/basicRequests.robot +2 −0 Original line number Original line Diff line number Diff line Loading @@ -188,6 +188,7 @@ Get Request Capif ... ${verify}=${FALSE} ... ${verify}=${FALSE} ... ${cert}=${NONE} ... ${cert}=${NONE} ... ${username}=${NONE} ... ${username}=${NONE} ... ${params}=${NONE} ${headers}= Create CAPIF Session ${server} ${access_token} ${headers}= Create CAPIF Session ${server} ${access_token} Loading @@ -202,6 +203,7 @@ Get Request Capif ... expected_status=any ... expected_status=any ... verify=${verify} ... verify=${verify} ... cert=${cert} ... cert=${cert} ... params=${params} RETURN ${resp} RETURN ${resp} Get CA Vault Get CA Vault Loading Loading
tests/features/Helper/helper.robot +946 −1 File changed.Preview size limit exceeded, changes collapsed. Show changes
tests/libraries/common/bodyRequests.py +8 −5 Original line number Original line Diff line number Diff line Loading @@ -11,29 +11,32 @@ def check_variable(input, data_type): print(input) print(input) print(type(input)) print(type(input)) print(data_type) print(data_type) allowed_types = [t.strip() for t in data_type.split("|")] if "None" in allowed_types and input is None: return True if isinstance(input, list): if isinstance(input, list): for one in input: for one in input: check_variable(one, data_type) check_variable(one, data_type) return True return True if data_type == "string": if "string" in allowed_types: if isinstance(input, str): if isinstance(input, str): return True return True else: else: raise Exception("variable is not string type") raise Exception("variable is not string type") elif data_type == "integer": elif "integer" in allowed_types: if isinstance(input, int): if isinstance(input, int): return True return True else: else: raise Exception("variable is not integer type") raise Exception("variable is not integer type") elif data_type == "boolean": elif "boolean" in allowed_types: if isinstance(input, boolean): if isinstance(input, boolean): return True return True else: else: raise Exception("variable is not integer type") raise Exception("variable is not integer type") elif data_type == "URI": elif "URI" in allowed_types: check_uri(input, data_type) check_uri(input, data_type) return True return True elif data_type == "URI_reference": elif "URI_reference" in allowed_types: check_uri(input, data_type) check_uri(input, data_type) return True return True elif data_type not in capif_types.keys(): elif data_type not in capif_types.keys(): Loading
tests/libraries/common/types.json +91 −1 Original line number Original line Diff line number Diff line Loading @@ -729,6 +729,96 @@ "startTime": "string", "startTime": "string", "stopTime": "string" "stopTime": "string" } } }, "InvokersResponse": { "mandatory_attributes": {}, "optional_attributes": { "invokers": "InvokersResponseAPIInvokerEnrolmentDetails", "long": "integer", "sortOrder": "string | None", "total": "integer", "totalPages": "integer", "message": "string" } }, "InvokersResponseAPIInvokerEnrolmentDetails": { "mandatory_attributes": { "api_invoker_id": "string", "onboarding_information": "InvokersResponseOnboardingInformation", "api_invoker_information": "string", "notification_destination": "URI", "uuid": "string" }, "optional_attributes": { "request_test_notification": "boolean", "websock_notif_config": "InvokersResponseWebsockNotifConfig", "api_invoker_information": "string", "supported_features": "SupportedFeatures", "api_list": "ServiceAPIDescription | None", "exp_time": "string | None", "onboarding_date": "string", "username": "string", "api_invoker_certificate": "string" } }, "InvokersResponseOnboardingInformation": { "mandatory_attributes": { "api_invoker_public_key": "string" }, "optional_attributes": { "api_invoker_certificate": "string", "onboarding_secret": "string" } }, "InvokersResponseWebsockNotifConfig": { "mandatory_attributes": {}, "optional_attributes": { "websocket_uri": "URI_reference", "request_websocket_uri": "boolean" } }, "ProvidersResponse": { "mandatory_attributes": {}, "optional_attributes": { "providers": "ProvidersResponseAPIProviderEnrolmentDetails", "long": "integer", "sortOrder": "string | None", "total": "integer", "totalPages": "integer", "message": "string" } }, "ProvidersResponseAPIProviderEnrolmentDetails": { "mandatory_attributes": { "reg_sec": "string", "api_prov_dom_id": "string" }, "optional_attributes": { "api_prov_funcs": "ProvidersResponseAPIProviderFunctionDetails", "api_prov_dom_info": "string", "supp_feat": "SupportedFeatures", "fail_reason": "string", "api_prov_name": "string | None", "onboarding_date": "string", "username": "string", "uuid": "string" } }, "ProvidersResponseAPIProviderFunctionDetails": { "mandatory_attributes": { "reg_info": "ProvidersResponseRegistrationInformation", "api_prov_func_role": "ApiProviderFuncRole", "api_prov_func_id": "string" }, "optional_attributes": { "api_prov_func_info": "string" } }, "ProvidersResponseRegistrationInformation": { "mandatory_attributes": { "api_prov_pub_key": "string", "api_prov_cert": "string" }, "optional_attributes": {} } } } }
tests/resources/common/basicRequests.robot +2 −0 Original line number Original line Diff line number Diff line Loading @@ -188,6 +188,7 @@ Get Request Capif ... ${verify}=${FALSE} ... ${verify}=${FALSE} ... ${cert}=${NONE} ... ${cert}=${NONE} ... ${username}=${NONE} ... ${username}=${NONE} ... ${params}=${NONE} ${headers}= Create CAPIF Session ${server} ${access_token} ${headers}= Create CAPIF Session ${server} ${access_token} Loading @@ -202,6 +203,7 @@ Get Request Capif ... expected_status=any ... expected_status=any ... verify=${verify} ... verify=${verify} ... cert=${cert} ... cert=${cert} ... params=${params} RETURN ${resp} RETURN ${resp} Get CA Vault Get CA Vault Loading