Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/icon-project/centralized-relay/test

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/icon-project/centralized-relay/test

  • v0.0.0-20241120080714-34a4dc4d63d3
  • Source
  • Go
  • Socket score

Version published
Created
Source

End-to-End Testing Setup and Demo

Prerequisites

To run the demo, the following software needs to be installed.

  • Docker compose [download]

Setting up the Environment

  1. Create an e2e-tests folder and clone the centralized-relay repository:

    mkdir e2e-tests
    cd e2e-tests
    git clone https://github.com/icon-project/centralized-relay.git
    cd centralized-relay
    make build-docker
    cd -  # Back to the root folder
    
  2. Build an icon-chain image

     git clone https://github.com/icon-project/goloop.git 
     cd goloop
     make gochain-icon-image
     cd -  # Back to the root folder
    

Running e2e Tests

To conduct tests for the IBC integration system, follow these steps:

1. Configure Environment Variables

Before initiating the tests, configure essential environment variables:

  • TEST_CONFIG_PATH: Set this variable to the absolute path of your chosen configuration file. You can create these configuration files using the sample files provided in the centralized-relay source folder. Sample configuration files are available at the following locations:
    • sample config : centralized-relay/test/testsuite/sample-config.yaml

Here's an example of environment variable configuration:

export TEST_CONFIG_PATH=/path/to/config.yaml

ℹ️ Please note that most of the config content can be used same as it in sample config however you may need to update the image name and version for Archway, Neutron, and Icon in the configuration file you create.

After configuring these variables, navigate to the centralized-relay source folder:

cd centralized-relay
2. Run the Test Script

Use the appropriate command to run the test suite. Depending on your specific testing requirements, you can use the following command:

./scripts/execute-test.sh [options]

Replace [options] with any command-line options or arguments that the test script supports. Here's an option block to help you:

Options:
 --clean: Clean contract directories (true/false, default: false).
 --build-xcall: Build xCall contracts (true/false, default: false).
 --xcall-branch <branch>: Specify the xCall branch to build (default: main).
 --use-docker: Use Docker for building contracts(true/false, default: false).
 --test <test_type>: Specify the type of test (e2e, default: e2e).

To perform an end-to-end (e2e) test with all the necessary builds, execute the following command:

./scripts/execute-test.sh --build-xcall --use-docker --test e2e

This command covers building IBC and xCall contracts while utilizing Docker and running an end-to-end test.

Once you've initially built the contracts using the command above, you can easily execute the e2e test by using the following simplified command:

./scripts/execute-test.sh  --test e2e

FAQs

Package last updated on 20 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc