chainlink-testing-framework

module
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT

README

GitHub tag (latest by date) Go Report Card Go Reference Go Version Tests Lint

The Chainlink Testing 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.

If you're looking to implement a new chain integration for the testing framework, head over to the blockchain directory for more info.

k8s package

We have a k8s package we are using in tests, it provides:

  • cdk8s based wrappers
  • High-level k8s API
  • Automatic port forwarding

You can also use this package to spin up standalone environments.

Local k8s cluster

Read here about how to spin up a local cluster

Install

Set up deps, you need to have node 14.x.x, helm and yarn

Then use

make install_deps
Running tests in k8s

To read how to run a test in k8s, read here

Usage

Create an env in a separate file and run it

export CHAINLINK_IMAGE="public.ecr.aws/chainlink/chainlink"
export CHAINLINK_TAG="1.4.0-root"
export CHAINLINK_ENV_USER="Satoshi"
go run k8s/examples/simple/env.go

For more features follow tutorial

Development
Running standalone example environment
go run k8s/examples/simple/env.go

If you have another env of that type, you can connect by overriding environment name

ENV_NAMESPACE="..."  go run k8s/examples/chainlink/env.go

Add more presets here

Add more programmatic examples here

If you have chaosmesh installed in your cluster you can pull and generated CRD in go like that

make chaosmesh

If you need to check your system tests coverage, use that

This repository contains helm charts used by the chainlink organization mostly in QA.

Chart Repository

You can add the published chart repository by pointing helm to the gh-pages branch with a personal access token (PAT) that has at least read-only access to the repository.

helm repo add chainlink-qa https://raw.githubusercontent.com/smartcontractkit/qa-charts/gh-pages/
helm search repo chainlink

Releasing Charts

The following cases will trigger a chart release once a PR is merged into the main branch. Modified packages or new packages get added and pushed to the gh-pages branch of the qa-charts repository.

  • An existing chart is version bumped
  • A new chart is added

Removed charts do not trigger a re-publish, the packages have to be removed and the index file regenerated in the gh-pages branch of the qa-charts repository.

Note: The qa-charts repository is scheduled to look for changes to the charts once every hour. This can be expedited by going to that repo and running the cd action via github UI.

Directories

Path Synopsis
Package blockchain handles connections to various blockchains
Package blockchain handles connections to various blockchains
contracts
dummy-module module
framework module
Package gauntlet enables the framework to interface with the chainlink gauntlet project
Package gauntlet enables the framework to interface with the chainlink gauntlet project
grafana module
havoc module
k8s
k8s
chaos-meshorg
imports/k8s/httpchaos/chaosmeshorg/jsii
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
chaos-meshorg
imports/k8s/iochaos/chaosmeshorg/jsii
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
imports/k8s/jsii
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
chaos-meshorg
imports/k8s/networkchaos/chaosmeshorg/jsii
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
chaos-meshorg
imports/k8s/podchaos/chaosmeshorg/jsii
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
chaos-meshorg
imports/k8s/podiochaos/chaosmeshorg/jsii
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
chaos-meshorg
imports/k8s/podnetworkchaos/chaosmeshorg/jsii
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
chaos-meshorg
imports/k8s/stresschaos/chaosmeshorg/jsii
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
chaos-meshorg
imports/k8s/timechaos/chaosmeshorg/jsii
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
pkg
lib module
grafana Module
libs module
Package networks holds all known network information for the tests
Package networks holds all known network information for the tests
seth module
Package testreporters holds all the tools necessary to report on tests that are run utilizing the testsetups package
Package testreporters holds all the tools necessary to report on tests that are run utilizing the testsetups package
tools
asciitable Module
citool Module
envresolve Module
flakeguard Module
ghsecrets Module
utils
projectpath
Package utils contains some common paths used in configuration and tests
Package utils contains some common paths used in configuration and tests
ptr
wasp module

Jump to

Keyboard shortcuts

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