Commit 1f936042 authored by Yann Garcia's avatar Yann Garcia
Browse files

Add TC_CDM_NODE_PULL_REQUEST_BV_02_01 and TC_CDM_NODE_MULTI_PULL_REQ_BV_01

parent 91405eb2
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ int xml_codec::encode(const LibHttp__XmlMessageBodyTypes::XmlBody& body, OCTETST
    }

    // Canonicalization of the XML document
    loggers::get_instance().log("xml_codec::encode: Canonicalization of the XML document");
    const std::string to_canonical(static_cast<const char*>((const char*)encoding_buffer.get_data()), encoding_buffer.get_len() + static_cast<const char*>((const char*)encoding_buffer.get_data()));
    std::string canonicalized;
    if (xml_converters::get_instance().xml_canonicalization(to_canonical, canonicalized) == -1) {
@@ -52,11 +53,14 @@ int xml_codec::encode(const LibHttp__XmlMessageBodyTypes::XmlBody& body, OCTETST
      data = OCTETSTRING(canonicalized.length(), (const unsigned char*)canonicalized.c_str());
    }

    { // TITAN issue: variant "namespace as 'http:www:cise:eu:servicemodel:v1:message' prefix 'ns4'" seems buggy
    { // TITAN issue: variant "namespace for 'agent/organization' seems buggy: <Agent xsi:type="agent:Organization">
      //        ==> xmlns:xsi=http://www.cise.eu/datamodel/v1/entity/organization/ xsi:type="ns4:Organization"
      loggers::get_instance().log("xml_codec::encode: Apply TITAN workaround");
      std::string s(static_cast<const unsigned char*>(data), data.lengthof() + static_cast<const unsigned char*>(data));
      size_t idx = 0;
      std::string f("tq0001");
      std::string t("ns4");
      std::string f("\"agent:Organization\"");
      std::string t("\"xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance\" xsi:type=\"ns4:Organization\"");
      loggers::get_instance().log("xml_codec::encode: Apply TITAN workaround: %s --> %s", f.c_str(), t.c_str());
      while ((idx = s.find(f)) != std::string::npos) {
        s.replace(idx, f.length(), t);
        idx += t.length();
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@
	"folders": [
		{
			"path": "."
		},
		{
			"path": "../../tmp/xer_decoding_issue"
		}
	],
	"settings": {
+50 −6
Original line number Diff line number Diff line
@@ -18,10 +18,32 @@ LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/xml"
LibHttp_Pics.PICS_USE_TOKEN_HEADER    := true
#LibHttp_Pics.PICS_TOKEN_HEADER       := "Basic WrongToken"

LibCise_Pics.PICS_CISE_ADAPTOR_URI := "/cise-adapter/api/v1/messages"

# LibCise test parameters
# Asynchronous Ack
LibCise_Pixits.PX_CISE_REQUEST_ACK := false

LibCise_Pics.PICS_CISE_ADAPTOR_URI := "/cise-adapter/api/v1/messages"
# Services
LibCise_Pixits.PX_CISE_SENDER_SERVICE_ID    := "de.sim2-node01.vessel.pull.consumer"
LibCise_Pixits.PX_CISE_RECIPIENT_SERVICE_ID := "de.sim1-node01.vessel.pull.provider"
# Discovery
LibCise_Pixits.PX_CISE_SEA_BASSIN := northSea
# Vessel infornmation
LibCise_Pixits.PX_VESSEL_IMO_NUMBER    := 7710525
LibCise_Pixits.PX_VESSEL_POS_LATITUDE  := "43.561062"
LibCise_Pixits.PX_VESSEL_POS_LONGITUDE := "10.264149"
# Organization
LibCise_Pixits.PX_ORGANIZATION_LEGAL_NAME := "A1"
LibCise_Pixits.PX_ORGANIZATION_UUID       := "787aa3e9b91b-5bc2-0cf5-80a8-183a716b8d59"
# Period
LibCise_Pixits.PX_PERIOD_START_DATE := "2023-09-01+01:00"
LibCise_Pixits.PX_PERIOD_END_DATE   := "2023-09-01+01:00"

# Upper Tester
LibCise_Pixits.PX_UT_VESSEL_TYPE                  := "Organization"
LibCise_Pixits.PX_UT_VESSEL_IDINTIFICATION_NUMBER := "inovaworks"
LibCise_Pixits.PX_UT_VESSEL_IDINTIFIER_UUID       := "com.inovaworks"
LibCise_Pixits.PX_MESSAGE_PROCESSING_INTERVAL     := 2.0

[LOGGING]
# In this section you can specify the name of the log file and the classes of events
@@ -41,7 +63,13 @@ LogEventTypes:= Yes
# In this section you can specify parameters that are passed to Test Ports.
# Unsecured
system.httpPort.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server=172.25.1.54,port=8200)"
system.httpPort_notif.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server_mode=1,local_port=8300,use_ssl=0)"
system.httpPort_notif.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server_mode=1,local_port=8300)"
# For multiple component 
CISEAdapter1.httpPort.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server=172.25.1.54,port=8200)"
CISEAdapter1.httpPort_notif.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server_mode=1,local_port=8310)"
CISEAdapter2.httpPort.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server=172.25.1.54,port=8200)"
CISEAdapter2.httpPort_notif.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server_mode=1,local_port=8311)"

# TLS
#system.httpPort.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server=172.25.1.54,port=443,use_ssl=1,trusted_ca_list=/home/y.garcia/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/y.garcia/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/y.garcia/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)"
#system.httpPort_notif.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1,mutual_auth=1,mutual_tls=1,trusted_ca_list=/home/y.garcia/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/y.garcia/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/y.garcia/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)"
@@ -74,12 +102,28 @@ system.utPort.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,
# In this section you can specify what parts of your test suite you want to execute.
#AtsCise_TestControl.control

# Check that the IUT responds with an HTPP 200 OK Acknowledgment response when receiving a PullRequest for vessels with discovery based on sea basin - no Acknowledgment required
AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_01_01
## cise_node_i1
# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving a PullRequest for Vessel service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_01_01

# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving a PullRequest for Action service - no Acknowledgment required
AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_02_01

# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving multiple PullRequest for Vessel service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_MULTI_PULL_REQ_BV_01

## cise_node_i2
# Check that the IUT sends a PullRequest to the GatewayProvider when receiving a PullRequest for a VesselService
#AtsCise_TestCases.TC_CDM_NODE_I2_PULL_REQ_BV_01

## cise_adaptor
# Check that the IUT sends a PullRequest for vessels with discovery based on sea basin - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_ADAPTOR_PULL_REQUEST_BV_01

## security
# Check that the IUT responds with an HTTP 200 OK Acknowledgment with Success when it receives a sign message
#AtsCise_TestCases.TC_CDM_NODE_SEC_BV_01

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts.
+47 −2
Original line number Diff line number Diff line
@@ -21,6 +21,27 @@ LibHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/xml"
LibHttp_Pics.PICS_USE_TOKEN_HEADER    := true
#LibHttp_Pics.PICS_TOKEN_HEADER       := "Basic WrongToken"

LibCise_Pics.PICS_CISE_ADAPTOR_URI := "/cise-adapter/api/v1/messages"

# LibCise test parameters
# Asynchronous Ack
LibCise_Pixits.PX_CISE_REQUEST_ACK                := false
# Services
LibCise_Pixits.PX_CISE_SENDER_SERVICE_ID          := "de.sim2-node01.vessel.pull.consumer"
LibCise_Pixits.PX_CISE_RECIPIENT_SERVICE_ID       := "de.sim1-node01.vessel.pull.provider"
# Discovery
LibCise_Pixits.PX_CISE_SEA_BASSIN                 := northSea
# Vessel infornmation
LibCise_Pixits.PX_VESSEL_IMO_NUMBER               := 7710525
LibCise_Pixits.PX_VESSEL_POS_LATITUDE             := "43.561062";
LibCise_Pixits.PX_VESSEL_POS_LONGITUDE            := "10.264149";

# Upper Tester
LibCise_Pixits.PX_UT_VESSEL_TYPE                  := "Organization"
LibCise_Pixits.PX_UT_VESSEL_IDINTIFICATION_NUMBER := "inovaworks"
LibCise_Pixits.PX_UT_VESSEL_IDINTIFIER_UUID       := "com.inovaworks"
LibCise_Pixits.PX_MESSAGE_PROCESSING_INTERVAL     := 2.0

[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# you want to log into the file or display on console (standard error).
@@ -40,6 +61,11 @@ LogEventTypes:= Yes
# Unsecured
system.httpPort.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server=192.168.1.44,port=8200,tcp_fragmented=1)"
system.httpPort_notif.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server_mode=1,local_port=8200,tcp_fragmented=1)"
# For multiple component 
CISEAdapter1.httpPort.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server=192.168.1.44,port=8200)"
CISEAdapter1.httpPort_notif.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server_mode=1,local_port=8310)"
CISEAdapter2.httpPort.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server=192.168.1.44,port=8200)"
CISEAdapter2.httpPort_notif.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server_mode=1,local_port=8311)"
# TLS
#system.httpPort.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server=192.168.1.44,port=443,use_ssl=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)"
#system.httpPort_notif.params := "HTTP(codecs=xml:xml_codec;json:json_codec)/TCP(debug=1,server_mode=1,local_port=443,use_ssl=1,mutual_auth=1,mutual_tls=1,trusted_ca_list=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem,privkey=/home/yann/var/ssl/archive/yanngarcia.ddns.net/privkey1.pem,certificate=/home/yann/var/ssl/archive/yanngarcia.ddns.net/fullchain1.pem)"
@@ -72,8 +98,27 @@ system.utPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168
# In this section you can specify what parts of your test suite you want to execute.
#AtsCise_TestControl.control

# Check that the IUT responds with an HTPP 200 OK Acknowledgment response when receiving a PullRequest for vessels with discovery based on sea basin - no Acknowledgment required
AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_01_01
## cise_node_i1
# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving a PullRequest for Vessel service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_01_01

# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving a PullRequest for Action service - no Acknowledgment required
AtsCise_TestCases.TC_CDM_NODE_PULL_REQUEST_BV_02_01

# Check that the IUT responds with an HTTP 200 OK Acknowledgment response when receiving multiple PullRequest for Vessel service - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_NODE_MULTI_PULL_REQ_BV_01

## cise_node_i2
# Check that the IUT sends a PullRequest to the GatewayProvider when receiving a PullRequest for a VesselService
#AtsCise_TestCases.TC_CDM_NODE_I2_PULL_REQ_BV_01

## cise_adaptor
# Check that the IUT sends a PullRequest for vessels with discovery based on sea basin - no Acknowledgment required
#AtsCise_TestCases.TC_CDM_ADAPTOR_PULL_REQUEST_BV_01

## security
# Check that the IUT responds with an HTTP 200 OK Acknowledgment with Success when it receives a sign message
#AtsCise_TestCases.TC_CDM_NODE_SEC_BV_01

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
+1868 −549

File changed.

Preview size limit exceeded, changes collapsed.

Loading