Loading ItsPkiItss_TestCases.ttcn +17 −17 Original line number Diff line number Diff line Loading @@ -3290,14 +3290,14 @@ module ItsPkiItss_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_wait.start(PX_EC_REPETITION_TIMEOUT); tc_ac.start(PX_EC_REPETITION_TIMEOUT); alt { [] a_await_ec_http_request_from_iut(mw_http_ec_request_generic, v_request) { log("*** " & testcasename() & ": PASS: EC repetition has been received after a ", tc_wait.read, " ***"); tc_wait.stop; log("*** " & testcasename() & ": PASS: EC repetition has been received after a ", tc_ac.read, " ***"); tc_ac.stop; f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** " & testcasename() & ": FAIL: EC repetition was not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } Loading Loading @@ -3750,14 +3750,14 @@ module ItsPkiItss_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test body tc_wait.start(PX_EC_REPETITION_TIMEOUT_TH2); tc_ac.start(PX_EC_REPETITION_TIMEOUT_TH2); alt { [] a_await_ec_http_request_from_iut(mw_http_ec_request_generic, v_request) { log("*** " & testcasename() & ": FAIL: No EC repetition should be received ***"); tc_wait.stop; tc_ac.stop; f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** " & testcasename() & ": PASS: EC repetition not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } Loading Loading @@ -6910,14 +6910,14 @@ module ItsPkiItss_TestCases { } // Test Body tc_wait.start(PX_AT_REPETITION_TIMEOUT_TH2); // PX_AT_REPETITION_TIMEOUT tc_ac.start(PX_AT_REPETITION_TIMEOUT_TH2); // PX_AT_REPETITION_TIMEOUT alt { [] a_await_at_http_request_from_iut(mw_http_at_request_generic, v_request) { log("*** " & testcasename() & ": FAIL: AT repetition has been received after a ", tc_wait.read, " ***"); //fails in TC5 tc_wait.stop; log("*** " & testcasename() & ": FAIL: AT repetition has been received after a ", tc_ac.read, " ***"); //fails in TC5 tc_ac.stop; f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } [] tc_wait.timeout { [] tc_ac.timeout { if (f_await_at_request_send_no_response(v_at_request) == true) { log("*** " & testcasename() & ": FAIL: AT repetition was received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); Loading Loading @@ -8284,7 +8284,7 @@ module ItsPkiItss_TestCases { } // End of 'alt' statement // Test Body tc_wait.start(v_t1); tc_ac.start(v_t1); alt { [] a_await_cpoc_http_request_from_iut( mw_http_request( Loading @@ -8293,13 +8293,13 @@ module ItsPkiItss_TestCases { )), v_response ) { tc_wait.stop; tc_ac.stop; // TODO Send an error response (400 Bad request?) log("*** " & testcasename() & ": FAIL: ITSS TLM CTL request received before the tiemer expiry ***"); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** " & testcasename() & ": PASS: No ITSS TLM CTL request done before the timer expiry ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } Loading Loading @@ -8509,7 +8509,7 @@ module ItsPkiItss_TestCases { } // End of 'alt' statement // Test Body tc_wait.start(v_t1); tc_ac.start(v_t1); alt { [] a_await_cpoc_http_request_from_iut( mw_http_request( Loading @@ -8518,13 +8518,13 @@ module ItsPkiItss_TestCases { )), v_response ) { tc_wait.stop; tc_ac.stop; // TODO Send an error response (400 Bad request?) log("*** " & testcasename() & ": FAIL: ITSS RCA DC request received before the tiemer expiry ***"); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** " & testcasename() & ": PASS: No RCA DC done before the timer expiry ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } Loading ItsPki_TestCases.ttcn +13 −13 Original line number Diff line number Diff line Loading @@ -11844,7 +11844,7 @@ module ItsPki_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_wait.start; tc_ac.start; alt { [] a_await_dc_http_request_from_iut( // Await for DC request mw_http_request( Loading @@ -11855,7 +11855,7 @@ module ItsPki_TestCases { ) { var EtsiTs103097Certificate v_rca_certificate; tc_wait.stop; tc_ac.stop; f_init_default_headers_list(-, "ca_response", v_headers); Loading @@ -11869,7 +11869,7 @@ module ItsPki_TestCases { f_http_send(v_headers, v_response); log("*** " & testcasename() & ": INFO: ToBeSignedRcaCtl sent ***"); tc_wait.start; tc_ac.start; repeat; } [] a_await_ctl_http_request_from_iut( // Await for CTL request Loading @@ -11881,7 +11881,7 @@ module ItsPki_TestCases { ) { var ToBeSignedRcaCtl v_to_be_signed_rca_ctl; tc_wait.stop; tc_ac.stop; f_init_default_headers_list(-, "ca_response", v_headers); Loading @@ -11899,7 +11899,7 @@ module ItsPki_TestCases { f_http_send(v_headers, v_response); log("*** " & testcasename() & ": INFO: ToBeSignedRcaCtl sent ***"); tc_wait.start; tc_ac.start; repeat; } [] a_await_crl_http_request_from_iut( // Await for CTL request Loading @@ -11911,7 +11911,7 @@ module ItsPki_TestCases { ) { var ToBeSignedCrl v_to_be_signed_crl; tc_wait.stop; tc_ac.stop; f_init_default_headers_list(-, "ca_response", v_headers); Loading @@ -11928,7 +11928,7 @@ module ItsPki_TestCases { f_http_send(v_headers, v_response); log("*** " & testcasename() & ": INFO: ToBeSignedCRl sent ***"); tc_wait.start; tc_ac.start; repeat; } [] a_await_cpoc_http_request_from_iut( // Await for TLM request (E-CPOC) Loading @@ -11940,7 +11940,7 @@ module ItsPki_TestCases { ) { var ToBeSignedTlmCtl v_to_be_signed_tlm_ctl; tc_wait.stop; tc_ac.stop; f_init_default_headers_list(-, "ca_response", v_headers); Loading @@ -11957,27 +11957,27 @@ module ItsPki_TestCases { f_http_send(v_headers, v_response); log("*** " & testcasename() & ": INFO: ToBeSignedTlmCtl sent ***"); tc_wait.start; tc_ac.start; repeat; } [] a_await_any_http_request_from_iut( mw_http_request, v_request ) { tc_wait.stop; tc_ac.stop; f_init_default_headers_list(-, "ca_response", v_headers); v_response := m_http_response(m_http_response_400_bad_request(m_http_message_body_html("<!DOCTYPE html><html><body><h1>ETSI ITS PKI Infrastructure L0 simulator</h1><p>Request not supported</p></body></html>"), v_headers)); f_http_send(v_headers, v_response); tc_wait.start; tc_ac.start; repeat; } [] tc_wait.timeout { [] tc_ac.timeout { //log("*** " & testcasename() & ": PASS: Terminate Generation/Distrbution server ***"); //f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); tc_wait.start; tc_ac.start; repeat; } } // End of 'alt' statement lib_system/LibItsPki_Functions.ttcn +16 −16 Original line number Diff line number Diff line Loading @@ -538,18 +538,18 @@ module LibItsPki_Functions { function f_utInitializeIut(template (value) UtPkiInitialize p_init) runs on ItsPkiItss { utPort.send(p_init); tc_wait.start; tc_ac.start; alt { [] utPort.receive(UtPkiResults: { utPkiInitializeResult := true }) { tc_wait.stop; tc_ac.stop; log("*** f_utInitializeIut: INFO: IUT initialized ***"); } [] utPort.receive { tc_wait.stop; tc_ac.stop; log("*** f_utInitializeIut: INFO: IUT could not be initialized ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** f_utInitializeIut: INFO: IUT could not be initialized in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } Loading Loading @@ -643,18 +643,18 @@ module LibItsPki_Functions { function f_sendUtTriggerUpdateEctl(template (value) charstring p_ectl_uri) runs on ItsPkiItss { utPort.send(UtPkiTrigger: { triggerUpdateEctl := { ectl_uri := p_ectl_uri } }); tc_wait.start; tc_ac.start; alt { [] utPort.receive(UtPkiResults: { utPkiTriggerResult := true }) { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerUpdateEctl: INFO: IUT has updated ECTL ***"); } [] utPort.receive { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerUpdateEctl: INFO: IUT could not update ECTL ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** f_sendUtTriggerUpdateEctl: INFO: IUT could not update ECTL in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } Loading @@ -664,18 +664,18 @@ module LibItsPki_Functions { function f_sendUtTriggerRequestForTlmCtl(template (value) charstring p_tlm_ctl_uri) runs on ItsPkiItss { utPort.send(UtPkiTrigger: { triggerRequestForTlmCtl := { tlm_ctl_uri := p_tlm_ctl_uri } }); tc_wait.start; tc_ac.start; alt { [] utPort.receive(UtPkiResults: { utPkiTriggerResult := true }) { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerRequestForTlmCtl: INFO: IUT has updated ECTL ***"); } [] utPort.receive { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerRequestForTlmCtl: INFO: IUT could not update ECTL ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** f_sendUtTriggerRequestForTlmCtl: INFO: IUT could not update ECTL in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } Loading @@ -685,18 +685,18 @@ module LibItsPki_Functions { function f_sendUtTriggerRequestForRcaCtl(template (value) charstring p_tlm_ctl_uri) runs on ItsPkiItss { utPort.send(UtPkiTrigger: { triggerRequestForRcaCtl := { tlm_ctl_uri := p_tlm_ctl_uri } }); tc_wait.start; tc_ac.start; alt { [] utPort.receive(UtPkiResults: { utPkiTriggerResult := true }) { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerRequestForRcaCtl: INFO: IUT has updated ECTL ***"); } [] utPort.receive { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerRequestForRcaCtl: INFO: IUT could not update ECTL ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** f_sendUtTriggerRequestForRcaCtl: INFO: IUT could not update ECTL in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } Loading Loading
ItsPkiItss_TestCases.ttcn +17 −17 Original line number Diff line number Diff line Loading @@ -3290,14 +3290,14 @@ module ItsPkiItss_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_wait.start(PX_EC_REPETITION_TIMEOUT); tc_ac.start(PX_EC_REPETITION_TIMEOUT); alt { [] a_await_ec_http_request_from_iut(mw_http_ec_request_generic, v_request) { log("*** " & testcasename() & ": PASS: EC repetition has been received after a ", tc_wait.read, " ***"); tc_wait.stop; log("*** " & testcasename() & ": PASS: EC repetition has been received after a ", tc_ac.read, " ***"); tc_ac.stop; f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** " & testcasename() & ": FAIL: EC repetition was not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } Loading Loading @@ -3750,14 +3750,14 @@ module ItsPkiItss_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test body tc_wait.start(PX_EC_REPETITION_TIMEOUT_TH2); tc_ac.start(PX_EC_REPETITION_TIMEOUT_TH2); alt { [] a_await_ec_http_request_from_iut(mw_http_ec_request_generic, v_request) { log("*** " & testcasename() & ": FAIL: No EC repetition should be received ***"); tc_wait.stop; tc_ac.stop; f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** " & testcasename() & ": PASS: EC repetition not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } Loading Loading @@ -6910,14 +6910,14 @@ module ItsPkiItss_TestCases { } // Test Body tc_wait.start(PX_AT_REPETITION_TIMEOUT_TH2); // PX_AT_REPETITION_TIMEOUT tc_ac.start(PX_AT_REPETITION_TIMEOUT_TH2); // PX_AT_REPETITION_TIMEOUT alt { [] a_await_at_http_request_from_iut(mw_http_at_request_generic, v_request) { log("*** " & testcasename() & ": FAIL: AT repetition has been received after a ", tc_wait.read, " ***"); //fails in TC5 tc_wait.stop; log("*** " & testcasename() & ": FAIL: AT repetition has been received after a ", tc_ac.read, " ***"); //fails in TC5 tc_ac.stop; f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } [] tc_wait.timeout { [] tc_ac.timeout { if (f_await_at_request_send_no_response(v_at_request) == true) { log("*** " & testcasename() & ": FAIL: AT repetition was received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); Loading Loading @@ -8284,7 +8284,7 @@ module ItsPkiItss_TestCases { } // End of 'alt' statement // Test Body tc_wait.start(v_t1); tc_ac.start(v_t1); alt { [] a_await_cpoc_http_request_from_iut( mw_http_request( Loading @@ -8293,13 +8293,13 @@ module ItsPkiItss_TestCases { )), v_response ) { tc_wait.stop; tc_ac.stop; // TODO Send an error response (400 Bad request?) log("*** " & testcasename() & ": FAIL: ITSS TLM CTL request received before the tiemer expiry ***"); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** " & testcasename() & ": PASS: No ITSS TLM CTL request done before the timer expiry ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } Loading Loading @@ -8509,7 +8509,7 @@ module ItsPkiItss_TestCases { } // End of 'alt' statement // Test Body tc_wait.start(v_t1); tc_ac.start(v_t1); alt { [] a_await_cpoc_http_request_from_iut( mw_http_request( Loading @@ -8518,13 +8518,13 @@ module ItsPkiItss_TestCases { )), v_response ) { tc_wait.stop; tc_ac.stop; // TODO Send an error response (400 Bad request?) log("*** " & testcasename() & ": FAIL: ITSS RCA DC request received before the tiemer expiry ***"); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** " & testcasename() & ": PASS: No RCA DC done before the timer expiry ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } Loading
ItsPki_TestCases.ttcn +13 −13 Original line number Diff line number Diff line Loading @@ -11844,7 +11844,7 @@ module ItsPki_TestCases { f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body tc_wait.start; tc_ac.start; alt { [] a_await_dc_http_request_from_iut( // Await for DC request mw_http_request( Loading @@ -11855,7 +11855,7 @@ module ItsPki_TestCases { ) { var EtsiTs103097Certificate v_rca_certificate; tc_wait.stop; tc_ac.stop; f_init_default_headers_list(-, "ca_response", v_headers); Loading @@ -11869,7 +11869,7 @@ module ItsPki_TestCases { f_http_send(v_headers, v_response); log("*** " & testcasename() & ": INFO: ToBeSignedRcaCtl sent ***"); tc_wait.start; tc_ac.start; repeat; } [] a_await_ctl_http_request_from_iut( // Await for CTL request Loading @@ -11881,7 +11881,7 @@ module ItsPki_TestCases { ) { var ToBeSignedRcaCtl v_to_be_signed_rca_ctl; tc_wait.stop; tc_ac.stop; f_init_default_headers_list(-, "ca_response", v_headers); Loading @@ -11899,7 +11899,7 @@ module ItsPki_TestCases { f_http_send(v_headers, v_response); log("*** " & testcasename() & ": INFO: ToBeSignedRcaCtl sent ***"); tc_wait.start; tc_ac.start; repeat; } [] a_await_crl_http_request_from_iut( // Await for CTL request Loading @@ -11911,7 +11911,7 @@ module ItsPki_TestCases { ) { var ToBeSignedCrl v_to_be_signed_crl; tc_wait.stop; tc_ac.stop; f_init_default_headers_list(-, "ca_response", v_headers); Loading @@ -11928,7 +11928,7 @@ module ItsPki_TestCases { f_http_send(v_headers, v_response); log("*** " & testcasename() & ": INFO: ToBeSignedCRl sent ***"); tc_wait.start; tc_ac.start; repeat; } [] a_await_cpoc_http_request_from_iut( // Await for TLM request (E-CPOC) Loading @@ -11940,7 +11940,7 @@ module ItsPki_TestCases { ) { var ToBeSignedTlmCtl v_to_be_signed_tlm_ctl; tc_wait.stop; tc_ac.stop; f_init_default_headers_list(-, "ca_response", v_headers); Loading @@ -11957,27 +11957,27 @@ module ItsPki_TestCases { f_http_send(v_headers, v_response); log("*** " & testcasename() & ": INFO: ToBeSignedTlmCtl sent ***"); tc_wait.start; tc_ac.start; repeat; } [] a_await_any_http_request_from_iut( mw_http_request, v_request ) { tc_wait.stop; tc_ac.stop; f_init_default_headers_list(-, "ca_response", v_headers); v_response := m_http_response(m_http_response_400_bad_request(m_http_message_body_html("<!DOCTYPE html><html><body><h1>ETSI ITS PKI Infrastructure L0 simulator</h1><p>Request not supported</p></body></html>"), v_headers)); f_http_send(v_headers, v_response); tc_wait.start; tc_ac.start; repeat; } [] tc_wait.timeout { [] tc_ac.timeout { //log("*** " & testcasename() & ": PASS: Terminate Generation/Distrbution server ***"); //f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); tc_wait.start; tc_ac.start; repeat; } } // End of 'alt' statement
lib_system/LibItsPki_Functions.ttcn +16 −16 Original line number Diff line number Diff line Loading @@ -538,18 +538,18 @@ module LibItsPki_Functions { function f_utInitializeIut(template (value) UtPkiInitialize p_init) runs on ItsPkiItss { utPort.send(p_init); tc_wait.start; tc_ac.start; alt { [] utPort.receive(UtPkiResults: { utPkiInitializeResult := true }) { tc_wait.stop; tc_ac.stop; log("*** f_utInitializeIut: INFO: IUT initialized ***"); } [] utPort.receive { tc_wait.stop; tc_ac.stop; log("*** f_utInitializeIut: INFO: IUT could not be initialized ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** f_utInitializeIut: INFO: IUT could not be initialized in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } Loading Loading @@ -643,18 +643,18 @@ module LibItsPki_Functions { function f_sendUtTriggerUpdateEctl(template (value) charstring p_ectl_uri) runs on ItsPkiItss { utPort.send(UtPkiTrigger: { triggerUpdateEctl := { ectl_uri := p_ectl_uri } }); tc_wait.start; tc_ac.start; alt { [] utPort.receive(UtPkiResults: { utPkiTriggerResult := true }) { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerUpdateEctl: INFO: IUT has updated ECTL ***"); } [] utPort.receive { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerUpdateEctl: INFO: IUT could not update ECTL ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** f_sendUtTriggerUpdateEctl: INFO: IUT could not update ECTL in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } Loading @@ -664,18 +664,18 @@ module LibItsPki_Functions { function f_sendUtTriggerRequestForTlmCtl(template (value) charstring p_tlm_ctl_uri) runs on ItsPkiItss { utPort.send(UtPkiTrigger: { triggerRequestForTlmCtl := { tlm_ctl_uri := p_tlm_ctl_uri } }); tc_wait.start; tc_ac.start; alt { [] utPort.receive(UtPkiResults: { utPkiTriggerResult := true }) { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerRequestForTlmCtl: INFO: IUT has updated ECTL ***"); } [] utPort.receive { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerRequestForTlmCtl: INFO: IUT could not update ECTL ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** f_sendUtTriggerRequestForTlmCtl: INFO: IUT could not update ECTL in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } Loading @@ -685,18 +685,18 @@ module LibItsPki_Functions { function f_sendUtTriggerRequestForRcaCtl(template (value) charstring p_tlm_ctl_uri) runs on ItsPkiItss { utPort.send(UtPkiTrigger: { triggerRequestForRcaCtl := { tlm_ctl_uri := p_tlm_ctl_uri } }); tc_wait.start; tc_ac.start; alt { [] utPort.receive(UtPkiResults: { utPkiTriggerResult := true }) { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerRequestForRcaCtl: INFO: IUT has updated ECTL ***"); } [] utPort.receive { tc_wait.stop; tc_ac.stop; log("*** f_sendUtTriggerRequestForRcaCtl: INFO: IUT could not update ECTL ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_wait.timeout { [] tc_ac.timeout { log("*** f_sendUtTriggerRequestForRcaCtl: INFO: IUT could not update ECTL in time ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } Loading