File tree 10 files changed +307
-77
lines changed
10 files changed +307
-77
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,13 @@ cleanup-ibc-test-containers:
7
7
$(DOCKER ) rm $$ id ; \
8
8
done
9
9
10
- e2e-test : cleanup-ibc-test-containers
10
+ init :
11
+ ./scripts/init.sh
12
+
13
+ e2e-test : init cleanup-ibc-test-containers
11
14
./scripts/run-e2e.sh $(test ) $(entrypoint )
12
15
13
16
compatibility-tests :
14
17
./scripts/run-compatibility-tests.sh $(release_branch )
15
18
16
- .PHONY : cleanup-ibc-test-containers e2e-test compatibility-tests
19
+ .PHONY : cleanup-ibc-test-containers e2e-test compatibility-tests init
Original file line number Diff line number Diff line change @@ -37,7 +37,13 @@ be quite common in most tests.
37
37
38
38
Tests can be run using a Makefile target under the e2e directory. ` e2e/Makefile `
39
39
40
- There are several envinronment variables that alter the behaviour of the make target.
40
+ The tests can be configured using a configuration file or environment variables.
41
+
42
+ See [ the example] ( ./sample.config.yaml ) to get started. The default location the tests look is ` ~/.ibc-go-e2e-config.yaml `
43
+ But this can be specified directly using the ` E2E_CONFIG_PATH ` environment variable.
44
+
45
+ There are several environment variables that alter the behaviour of the make target which will override any
46
+ options specified in your config file.
41
47
42
48
| Environment Variable | Description | Default Value |
43
49
| ----------------------| -------------------------------------------| ---------------|
Original file line number Diff line number Diff line change @@ -22,9 +22,11 @@ const (
22
22
// Config holds configuration values for the relayer used in the tests.
23
23
type Config struct {
24
24
// Tag is the tag used for the relayer image.
25
- Tag string
25
+ Tag string `yaml:"tag"`
26
26
// Type specifies the type of relayer that this is.
27
- Type string
27
+ Type string `yaml:"type"`
28
+ // Image is the image that should be used for the relayer.
29
+ Image string `yaml:"image"`
28
30
}
29
31
30
32
// New returns an implementation of ibc.Relayer depending on the provided RelayerType.
Original file line number Diff line number Diff line change
1
+ # This file contains configuration for running e2e tests.
2
+ # Many of these fields can be overridden with environment variables.
3
+ # All fields that support this have the corresponding environment variable name in a comment beside the field.
4
+
5
+ ---
6
+ chains :
7
+ # the entry at index 0 corresponds to CHAIN_A
8
+ - chainId : chain-a
9
+ numValidators : 1
10
+ numFullNodes : 0
11
+ image : ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE
12
+ tag : main # override with CHAIN_A_TAG
13
+ binary : simd # override with CHAIN_BINARY
14
+
15
+ # the entry at index 1 corresponds to CHAIN_B
16
+ - chainId : chain-b
17
+ numValidators : 1
18
+ numFullNodes : 0
19
+ image : ghcr.io/cosmos/ibc-go-simd # override with CHAIN_IMAGE
20
+ tag : main # override with CHAIN_B_TAG
21
+ binary : simd # override with CHAIN_BINARY
22
+
23
+ relayer :
24
+ type : rly # override with RELAYER_TYPE
25
+ image : damiannolan/rly
26
+ tag : latest # override with RELAYER_TAG
27
+
28
+ cometbft :
29
+ logLevel : info
30
+
31
+ debug :
32
+ # setting this value to true will force log collection even if the test passes.
33
+ dumpLogs : false
34
+
35
+ # Required only for upgrade tests.
36
+ # Chain A will be upgraded the specified tag.
37
+ # The plan name must be registered as an upgrade handler in the given tag.
38
+ upgrade :
39
+ planName : " "
40
+ tag : " "
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -euo pipefail
4
+
5
+ # ensure_config_file makes sure there is a config file for the e2e tests either by creating a new one using the sample,
6
+ # it is copied to either the default location or the specified env location.
7
+ function ensure_config_file(){
8
+ local config_file_path=" ${HOME} /.ibc-go-e2e-config.yaml"
9
+ if [[ ! -z " ${E2E_CONFIG_PATH:- } " ]]; then
10
+ config_file_path=" ${E2E_CONFIG_PATH} "
11
+ fi
12
+ if [[ ! -f " ${config_file_path} " ]]; then
13
+ echo " creating e2e config file from sample."
14
+ echo " copying sample.config.yaml to ${config_file_path} "
15
+ cp sample.config.yaml " ${config_file_path} "
16
+ fi
17
+ echo " using config file at ${config_file_path} for e2e test"
18
+ }
19
+
20
+ ensure_config_file
Original file line number Diff line number Diff line change @@ -5,10 +5,6 @@ set -eo pipefail
5
5
TEST=" ${1} "
6
6
ENTRY_POINT=" ${2:- } "
7
7
8
- export CHAIN_A_TAG=" ${CHAIN_A_TAG:- main} "
9
- export CHAIN_IMAGE=" ${CHAIN_IMAGE:- ghcr.io/ cosmos/ ibc-go-simd} "
10
- export CHAIN_BINARY=" ${CHAIN_BINARY:- simd} "
11
-
12
8
# if jq is installed, we can automatically determine the test entrypoint.
13
9
if command -v jq > /dev/null; then
14
10
cd ..
You can’t perform that action at this time.
0 commit comments