integrations-framework

module
v0.0.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2021 License: MIT

README

Go Report Card Go Reference Tests Lint

The Chainlink Integration Framework is a blockchain development framework written in Go. Its primary purpose is to help chainlink developers create extensive integration, e2e, performance, and chaos tests to ensure the stability of the chainlink project. It can also be helpful to those who just want to use chainlink oracles in their projects to help test their contracts, or even for those that aren't using chainlink.

See the docs or our go reference page for more detailed info and examples. If you just want a quick overview, keep reading.

WIP

As of now, this framework is still very much a work in progress, and will have frequent changes, many of which will probably be breaking.

As of Monday, November 22, 2021, there has been a massive overhaul of how the framework works. Namely use of the helmenv library

Setup

In order to use this framework, you must have a connection to an actively running Kubernetes cluster. If you don't have one handy, check out minikube which should work fine for smaller tests, but will likely need to be allocated more power, or you'll need to use a more powerful cluster in general to run tests that require lots of services, like OCR.

Usage

Here's a simple example on deploying and interacting with a basic storage contract using this framework and Ginkgo, a BDD testing framework we've come to really enjoy. You can use another testing framework, including Go's default testing if you prefer otherwise.

See our suite/smoke directory for quite a few examples of the framework's usage.

If you would like to change the Chainlink values that are used for environments, you can use JSON to squash them. Have a look over at our helmenv chainlink charts to get a grasp of how things are structured. We'll be writing more on this later, but for now, you can squash values by providing a CHARTS environment variable.

CHARTS='{"chainlink": {"values": {"chainlink": {"image": {"version": "<version>"}}}}}' make test_smoke args="-nodes=5"

You can also use a file name, head over to the ./config directory to see how.

Directories

Path Synopsis
Package actions enables common chainlink interactions
Package actions enables common chainlink interactions
Package client handles connections between chainlink nodes and different blockchain networks
Package client handles connections between chainlink nodes and different blockchain networks
chaos
Package chaos handles the setup necessary to run chaos tests across chainlnk nodes and blockchains
Package chaos handles the setup necessary to run chaos tests across chainlnk nodes and blockchains
Package config enables loading and utilizing configuration options for different blockchain networks
Package config enables loading and utilizing configuration options for different blockchain networks
Package contracts handles deployment, management, and interactions of smart contracts on various chains
Package contracts handles deployment, management, and interactions of smart contracts on various chains

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL