Tests to Perform
We will perform two tests:
- Synchronization with the blockchain
- P2P verification
We will create a temporary entity, one on your node and another on ours, and see if it synchronizes via the blockchain.
We can do it using Postman or using the curl command by postforwarding to Scorpio:
|
kubectl port-forward svc/scorpio 9090:9090 -n <your namespace>
|
Or if we have access to the bae marketplace, from there; For example, this is our configured site: Bae marketplace local
|
curl --location 'http://localhost:9090/ngsi-ld/v1/entities/?type=catalog' \ --header 'Content-Type: application/json' \ --data '{ "id": "urn:catalog:MyDummyTest", "type": "catalog", "version": "2.5", "lastUpdate": "2024-07-09T12:00:00Z", "lifecycleStatus": "Launched" }'
|
And we will validate that it has been created correctly using curl
|
curl --location 'http://localhost:9090/ngsi-ld/v1/entities/urn:catalog:MyDummyTest'
|
For P2P validation, we first need to create a Request Point (RP) by removing our node from the Trusted Access Nodes List. Create a new entity as shown above, and we will validate that we have NOT processed that entity.
Run the following command on the node where the entity was created and validate that this time, we have received it.
|
kubectl port-forward svc/desmos 8080:8080 -n <your namespace>
|
|
curl --location 'http://localhost:8080/backoffice/v2/actions/sync' \ --header 'Authorization: Bearer eyJ0eXAiOiJkcG9wK2p3dCIsImFsZyI6IkVTMjU2IiwiandrIjp7Imt0eSI6IkVDIiwidXNlIjoic2lnIiwiY3J2IjoiUC0yNTYiLCJ4IjoiTlJMbXBVTjE3VGsxWUd3WHNuVVlkbG9qTFpxZHhqRVhqNHlTSnZKZWRJMCIsInkiOiJwV2ozVEdPeGRvTGpzRU1rbDFJQ3RPYmRENm12bzZXaDJTMjdKelNweEZRIn19.eyJodG0iOiJQT1NUIiwiaHR1IjoiaHR0cHM6Ly9kZW1vcy5kb21lLW1hcmtldHBsYWNlLWxjbC5vcmcvYXBpL3YxL2VudGl0aWVzLzEyMzQ1Njc4IiwiaWF0IjoxNzM1ODI4MjI2LCJqdGkiOiJkZDQyNzVmYi00MjhmLTQ2NjMtOGI4ZS0zMTUxMDVkZmQ2ZjIifQ.vZ33bJ2rYFEki5rM6uFmE46t4Ot4BCAIrnQXd-GWNnVwXWPtdhmP9gWa7u5xJS-ZrNJAkbj4Wh_tjxiSQyRt5Q'
|
No Comments