Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper committed Sep 12, 2024
1 parent 5f768be commit 18e2e21
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/tests-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ jobs:
DISCOVERY_METADATA_ID: urn:wmo:md:int-wmo-test:cap
run: |
python3 wis2box-ctl.py execute wis2box dataset publish $DISCOVERY_METADATA
curl -s http://localhost/oapi/collections/discovery-metadata/items/$DISCOVERY_METADATA_ID --output /tmp/$DISCOVERY_METADATA_ID
less /tmp/$DISCOVERY_METADATA_ID
curl -s http://localhost/data/metadata/$DISCOVERY_METADATA_ID.json --output /tmp/$DISCOVERY_METADATA_ID
pywcmp ets validate /tmp/$DISCOVERY_METADATA_ID
python3 tests/send_CAP_as_message.py
python3 tests/send_CAP_as_message.py
- name: add Malawi synop data (csv2bufr synop_bufr template) 🇲🇼
env:
TOPIC_HIERARCHY: origin/a/wis2/mw-mw_met_centre-test/data/core/weather/surface-based-observations/synop
Expand Down
71 changes: 71 additions & 0 deletions tests/data/CAP/cap_example.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml-stylesheet type="text/xsl" href="https://www.meteo.sc/cap-alert-style.xsl"?>
<alert xmlns="urn:oasis:names:tc:emergency:cap:1.2">
<identifier>urn:oid:2.49.0.0.690.0.2024.5.19.13.18.0</identifier>
<sender>[email protected]</sender>
<sent>2024-05-19T17:18:00+04:00</sent>
<status>Actual</status>
<msgType>Alert</msgType>
<scope>Public</scope>
<info>
<language>en</language>
<category>Met</category>
<event>Strong Winds</event>
<urgency>Immediate</urgency>
<severity>Moderate</severity>
<certainty>Observed</certainty>
<audience>General Public</audience>
<effective>2024-05-19T17:30:00+04:00</effective>
<onset>2024-05-19T17:30:00+04:00</onset>
<expires>2024-05-19T23:30:00+04:00</expires>
<senderName>Seychelles Meteorological Authority</senderName>
<headline>Moderate to strong south-easterly winds over Aldabra area</headline>
<description>Moderate to strong south-easterly winds over Aldabra area associated with a severe tropical storm Ialy on 19th May 2024 from 5pm to 11pm</description>
<instruction>Beware of strong south-easterly winds of 40km/hr gusting to 60km/hr causing rough seas. Mariners are advised to take extra precautions when navigating these areas</instruction>
<web>https://www.meteo.sc/alerts/severe-tropical-storm-ialy-is-expected-to-cause-moderate-to-strong-south-easterly-winds-over-aldabra-area-on-19th-may-2024/</web>
<contact>[email protected]</contact>
<area>
<areaDesc>Aldabra area</areaDesc>
<polygon>-9.186965,46.078276 -9.336746,45.936002 -9.57065,45.983427 -9.748309,46.116216 -9.897844,46.249006 -10.000609,46.42922 -9.953902,46.694799 -9.692216,46.770679 -9.467752,46.770679 -9.327387,46.742224 -9.186965,46.694799 -9.140146,46.533555 -9.121416,46.362825 -9.186965,46.078276</polygon>
</area>
</info>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/>
<ds:Reference URI="">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2006/12/xml-c14n11"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>s9RKcAph3khDLX4nOQQDZ7c23uVZqCDJziRZznnh3nA=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>liScT3sHEpNO1TXEDY1nMC5FoBnQruioH/xkU1rNRKfK8Y3y4/lRz64ueJfoWGYB/N3NWLkMhQ6V0X4lHGPyfA==</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>MIIDeTCCAv6gAwIBA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3zs0w7iI23MfZ
BGuNKUUa7qHLR1O6eNnEmrSH24bdzXdacRoCMQCLW6bf0Y1mwuJN+jBCjTbyCe+F
1ZEDJBb2AKxTZpWdVdtfRErY5BxHuACOm9SlXGE=
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
</alert>
2 changes: 1 addition & 1 deletion tests/send_CAP_as_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
BROKER_HOST = 'localhost'
BROKER_PORT = '1883'

filename = 'tests/data/CAP/sc_example.xml'
filename = 'tests/data/CAP/cap_example.xml'

# create a message containing the CAP alert in
# the data field as base64 encoded bytes
Expand Down

0 comments on commit 18e2e21

Please sign in to comment.