Commit c7e310ae authored by Dan Jones's avatar Dan Jones
Browse files

Merge branch 'validate-example-messages' into '19-refactor-tests'

Ensure example messages pass validation in javascript

See merge request !10
......@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 1,
"source": "hydrosurv_adapter",
"destination": "soar.rhul.autonomy-engine.ae-1.send.acknowledgement",
"destination": "soar.hydrosurv.reav.reav1.receive.acknowledgement",
"delivery_type": "publish",
"encoded": false
},
......
......@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "autonomy_engine",
"destination": "soar.hydrosurv.usv.reav-60.send.mission_plan",
"destination": "soar.hydrosurv.reav-60.reav-60-1.send.mission_plan",
"delivery_type": "publish",
"encoded": false
},
......
......@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "gui",
"destination": "soar.rhul.autonomy-engine.ae-1.send.planning_configuration",
"destination": "soar.all.all.all.receive.planning_configuration",
"delivery_type": "publish",
"encoded": false
},
......@@ -126,8 +126,7 @@
"swath_width": 10
}
}
],
"region_of_interest": {}
]
},
{
"squad_ID": 3,
......@@ -153,8 +152,7 @@
"scan_type": "MBES"
}
}
],
"region_of_interest": {}
]
}
]
}
......
......@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "hermes",
"destination": "soar.rhul.autonomy-engine.ae-1.send.platform_status",
"destination": "soar.planet-ocean.ecosub.ecosub-5.receive.platform_status",
"delivery_type": "publish",
"encoded": false
},
......
......@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "ecosub_c2",
"destination": "soar.rhul.autonomy-engine.ae-1.send.platform_status",
"destination": "soar.planet-ocean.ecosub.ecosub-2.receive.platform_status",
"delivery_type": "publish",
"encoded": false
},
......
......@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "ecosub_c2",
"destination": "soar.rhul.autonomy-engine.ae-1.send.observation",
"destination": "soar.planet-ocean.ecosub.ecosub-2.receive.observation",
"delivery_type": "publish",
"encoded": false
},
......@@ -22,7 +22,6 @@
"longitude": -11.122,
"quality_of_point": 0.50
}
],
"region_surveyed": ""
]
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "hermes",
"destination": "soar.rhul.autonomy-engine.ae-1.send.platform_status",
"destination": "soar.planet-ocean.ecosub.ecosub-5.receive.platform_status",
"delivery_type": "publish",
"encoded": false
},
......
......@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "ecosub_c2",
"destination": "soar.rhul.autonomy-engine.ae-1.send.platform_status",
"destination": "soar.planet-ocean.ecosub.ecosub-2.receive.platform_status",
"delivery_type": "publish",
"encoded": false
},
......
......@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "gui",
"destination": "soar.rhul.autonomy-engine.ae-1.send.planning_configuration",
"destination": "soar.all.all.all.receive.planning_configuration",
"delivery_type": "publish",
"encoded": false
},
......@@ -47,7 +47,6 @@
"platform_ID": "reav-60-1",
"serial": "reav-60",
"emergency": {
"additional_data": {},
"target_waypoint_latitude": -7.432,
"target_waypoint_longitude": 50.365,
"safe_command": "go_home",
......@@ -55,8 +54,7 @@
},
"max_velocity": 0.9,
"min_altitude": 15.2,
"min_velocity": 0.1,
"additional_data": {}
"min_velocity": 0.1
}
],
"region_of_interest": {
......@@ -93,7 +91,6 @@
"serial": "ecosub-2",
"model": "ecosub",
"emergency": {
"additional_data": {},
"target_waypoint_latitude": -7.432,
"target_waypoint_longitude": 50.365,
"safe_command": "go_home",
......@@ -126,8 +123,7 @@
"swath_width": 10
}
}
],
"region_of_interest": {}
]
},
{
"squad_ID": 3,
......@@ -153,8 +149,7 @@
"scan_type": "MBES"
}
}
],
"region_of_interest": {}
]
}
]
}
......
......@@ -4,14 +4,14 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 1,
"source": "hydrosurv_adapter",
"destination": "soar.rhul.autonomy-engine.ae-1.send.acknowledgement",
"destination": "soar.hydrosurv.reav-60.reav-60-1.receive.acknowledgement",
"delivery_type": "publish",
"encoded": false
},
"payload":{
"message_type": "acknowledgement",
"autonomy_engine_plan_ID": 1,
"platform_ID": "reav-x-1",
"platform_ID": "reav-60-1",
"approved": false
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "autonomy_engine",
"destination": "soar.hydrosurv.usv.reav-60.send.mission_plan",
"destination": "soar.hydrosurv.reav-60.reav-60-1.send.mission_plan",
"delivery_type": "publish",
"encoded": false
},
......
......@@ -4,7 +4,7 @@
"timestamp": "2022-11-16T00:00:00Z",
"version": 2,
"source": "hydrosurv_adapter",
"destination": "soar.rhul.autonomy-engine.ae-1.send.platform_status",
"destination": "soar.hydrosurv.reav-60.reav-60-1.receive.platform_status",
"delivery_type": "publish",
"encoded": false
},
......
......@@ -9,6 +9,7 @@ acknowledgement_schema = {
"type": "string",
"description": "Type of message",
"example": "acknowledgement",
"enum": ["acknowledgement"],
},
"autonomy_engine_plan_ID": {
"type": "integer",
......
......@@ -81,6 +81,7 @@ mission_plan_schema = {
"type": "string",
"description": "Type of message",
"example": "mission_plan",
"enum": ["mission_plan"],
},
"autonomy_engine_plan_ID": {
"type": "integer",
......
......@@ -36,6 +36,7 @@ observation_schema = {
"type": "string",
"description": "Type of message",
"example": "observation",
"enum": ["observation"],
},
"platform_ID": {
"type": "string",
......
......@@ -84,6 +84,7 @@ platform_schema = {
"additional_specs": {
"description": "Any addition fields/data to be added here",
"example": {"swath_width": 10.0, "scan_type": "DVL"},
"type": "object",
},
},
"required": [
......@@ -163,6 +164,7 @@ planning_configuration_schema = {
"type": "string",
"description": "Type of message",
"example": "planning_configuration",
"enum": ["planning_configuration"],
},
"planning_config_ID": {
"type": "integer",
......
......@@ -32,6 +32,7 @@ platform_status_schema = {
"type": "string",
"description": "Type of message",
"example": "platform_status",
"enum": ["platform_status"],
},
"platform_ID": {
"type": "string",
......
......@@ -31,8 +31,9 @@
"message_type":{
"description":"Type of message",
"example":"acknowledgement",
"type":"string"
},
"type":"string",
"enum": ["acknowledgement"]
},
"platform_ID":{
"description":"Unique identifier for this platform",
"example":"reav-x-1",
......@@ -107,7 +108,8 @@
"message_type":{
"description":"Type of message",
"example":"mission_plan",
"type":"string"
"type":"string",
"enum": ["mission_plan"]
},
"plan":{
"items":{
......@@ -202,7 +204,8 @@
"message_type":{
"description":"Type of message",
"example":"observation",
"type":"string"
"type":"string",
"enum": ["observation"]
},
"platform_ID":{
"description":"Unique identifier for this platform",
......@@ -319,7 +322,8 @@
"message_type":{
"description":"Type of message",
"example":"planning_configuration",
"type":"string"
"type":"string",
"enum": ["planning_configuration"]
},
"planning_config_ID":{
"description":"Unique identifier tagged to version of this configuration plan",
......@@ -351,7 +355,8 @@
"description":"Any addition fields/data to be added here",
"example":{
}
},
"type":"object"
},
"safe_command":{
"description":"Command/Action that is native to respective partner's platform/C2",
......@@ -569,7 +574,8 @@
"message_type":{
"description":"Type of message",
"example":"platform_status",
"type":"string"
"type":"string",
"enum": ["platform_status"]
},
"mission_plan_ID":{
"description":"Mission plan ID according to platform-C2 system",
......
node_modules/
\ No newline at end of file
FROM node:18.7.0-alpine
WORKDIR /app/tests-js
COPY tests-js/package.json /app/tests-js/package.json
RUN yarn install
WORKDIR /app
COPY . /app
WORKDIR /app/tests-js
CMD [ 'yarn', 'test' ]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment