The UNTP Test Suite is a comprehensive set of tools designed to ensure conformance to the UN Transparency Protocol (UNTP). This repository contains the following key components:
- Mock Apps: Demonstrating how decentralized applications work within the UNTP ecosystem.
- Test Suites: Covering three tiers of testing - technical interoperability, semantic interoperability, and graph validation.
- Documentation Site: Providing detailed information on setup, configuration, and usage.
The Mock Apps are structured into three main packages:
- Components: Contains the UI components.
- Core: Handles rendering and interaction between components and services.
- Services: Contains the business logic.
These tools allow implementers to model value chains, test UNTP functionality in real-world scenarios, and ensure their implementations align with the UNTP specification across various aspects of interoperability and validation.
- Node.js version 20.12.2
- yarn version 1.22.22
- Docker and Docker Compose (for running services)
To set up and run the mock app:
-
Install dependencies:
yarn install
-
Build the package:
yarn build
-
Start the project:
yarn start
We provide a Docker Compose configuration to easily set up the required services (Verifiable Credential Service, Storage Service, a database for the VC service) and the documentation site. To start these services:
docker-compose up -d
This will start pre-configured instances of the necessary services and the documentation site. The app-config.json
mock app config file is pre-configured to work with these Docker services.
If you want to run the Docker Compose along with seeding data, you can use the following command:
SEEDING=true docker-compose up -d
The SEEDING
environment variable acts as a flag to seed the Identity Resolver and Mock Global GS1 Resolver services with the necessary data.
For detailed information about the configuration, services, and how to use the mock app, please refer to the documentation site.
The documentation site is available at http://localhost:3002
after starting the services with Docker Compose.
If you need to run the documentation site manually:
cd documentation
yarn install
yarn start
Please consult the documentation for comprehensive instructions on setting up and using the mock app, regardless of whether you're using Docker Compose or setting up services manually.
The Identity Resolver and Mock Global GS1 Resolver services require seed data to function correctly. The seed data scripts are provided in the idr-data.sh and mock-gs1-data.sh. To seed the data, run the following commands at the root level:
# Set environment variables
export IDR_SERVICE_HOST=localhost # IDR service host
export IDR_SERVICE_PORT=3000 # IDR service port
export IDR_SERVICE_API_KEY=test123 # IDR service API key
export IDR_SERVICE_DOMAIN=http://localhost:3000 # IDR service domain
export MOCK_GS1_SERVICE_HOST=localhost # Mock GS1 service host
export MOCK_GS1_SERVICE_PORT=3001 # Mock GS1 service port
export MOCK_GS1_SERVICE_API_KEY=test456 # Mock GS1 service API key
# Run seeding scripts
./seeding/idr-data.sh
./seeding/mock-gs1-data.sh