Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing guide for Canis Major blockchain adaptor #93

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

asmataamallah25
Copy link
Collaborator

This document provides a comprehensive guide for testing the Canis Major blockchain adaptor's functionality.


Canis Major serves as a blockchain adaptor within the FIWARE ecosystem, providing secure data persistence across blockchain networks and the Context Broker. The workflow is straightforward:
- clients submit transactions containing payload data and wallet credentials.
- These data are authenticated through a PEP Proxy and KeyRock Identity Management.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not clear to me why we have this comment. All the examples developed does not include Keyrock in the transactions. Can you elaborate it?

- Once validated, the data is stored in an ETSI Broker (e.g., Orion-LD Broker) and simultaneously processed into a Merkle tree structure for blockchain integration.
- The system then signs the transaction using the provided wallet credentials and submits it to an Oketh-compatible blockchain.

### Integradtion tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integration tests

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


```shell
cd it
docker-compose -f docker-compose/docker-compose-env.yaml -f docker-compose/docker-compose-java.yaml up
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you execute this command, it is possible to execute the next command... Can you check it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command is the same from the master branch, because you need to access the it folder where you find the docker compose files to run

##### Wallet Headers
- Wallet-Type: Specifies the wallet service type as "vault"
- Wallet-Token: Provides authentication token for the vault service
- Wallet-Address: Points to the Ethereum accoun
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

account

You need to explain the reason for those values regarding Wallet HTTP Headers

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

```

The headers included in the HTTP request are:
##### Wallet Headers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wallet HTTP Headers

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

// Sends the request and returns the response body as a String
return client.send(request, HttpResponse.BodyHandlers.ofString()).body();
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a new line at the end of the file

import validator.model.ValidationInfo;

@RestController
@RequestMapping("/validation service")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"/validation service"?

how do you call this endpoint?

request.blockchainResponse()
);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, take a look to the diagram that I sent to you about the endpoints to be implemented.

Add a new line at the end of the file.

) {
// Records automatically generate getters, so these methods are unnecessary
// and should be removed unless you need custom implementations
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new line at the end of the file

public String getErrorMessage() {
return String.join(", ", errors);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new line at the end of the file

@jason-fox jason-fox added documentation Improvements or additions to documentation patch Should be applied for dependency updates and small bugfixes. labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation patch Should be applied for dependency updates and small bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants