Skip to main content

8. AN Synchronization Tests

These are the steps that will be taken before the tests: 


8.1. Backup before testing 

Perform a dump backup of the Scorpio data so we can restore it afterwards and delete the data of your DB. Remember to put it out of your docker or it will disappear if you restart your AN. 

 
8.2. Configuration for testing

Add the externalAccessNodesUrls configuration inside the APP block as shown on the image below, which should be adapted for these tests. (It will be reconfigured later to point to the correct location.)


externalAccessNodesUrls: 
  enableCustomUrls: true 
  customUrls:https://desmos.dome-marketplace-lcl.org”

How it should looks

8.3. Review the values configuration and Trusted Lists registry

Verify that you complete all the steps above and your machine is correctly registered in the Trusted lists

Trusted Lists github 

8.4. Install AN 

After doing the previous steps, be sure that you installed your AN correctly. I'm leaving these commands here in case they're helpful. Remember that you need to throw these commands inside your values.yaml directory.

helm dependency build
helm install myaccessnode . -f values.yaml

8.5. Desmos running without errors

Confirm that your desmos pod is working correctly. You could check it with 

kubectl logs desmos-648bdbc988-pl2ft -n <your-namespace> -c desmos

Tests to Perform

We will perform two tests: 

  1. Synchronization with the blockchain 

  1. 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 marketplace 

 

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'