Skip to content

Commit

Permalink
rename(env)!: IBCTEST_ to ICTEST_
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed May 10, 2024
1 parent c0037a7 commit 8258af7
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions chainfactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ func initBuiltinChainConfig(log *zap.Logger) (map[string]ibc.ChainConfig, error)
var dat []byte
var err error

// checks if IBCTEST_CONFIGURED_CHAINS environment variable is set with a path,
// checks if ICTEST_CONFIGURED_CHAINS environment variable is set with a path,
// otherwise, ./configuredChains.yaml gets embedded and used.
val := os.Getenv("IBCTEST_CONFIGURED_CHAINS")
val := os.Getenv("ICTEST_CONFIGURED_CHAINS")

if val != "" {
dat, err = os.ReadFile(val)
Expand Down
2 changes: 1 addition & 1 deletion configuredChains.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## NOTICE: This file gets embedded into interchaintest binary.
## Set the environment variable: IBCTEST_CONFIGURED_CHAINS to a path
## Set the environment variable: ICTEST_CONFIGURED_CHAINS to a path
## to use custom versions of this file

agoric:
Expand Down
4 changes: 2 additions & 2 deletions dockerutil/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ const (
// using DockerSetup are retained or deleted following a test failure.
//
// The value is false by default, but can be initialized to true by setting the
// environment variable IBCTEST_SKIP_FAILURE_CLEANUP to a non-empty value.
// environment variable ICTEST_SKIP_FAILURE_CLEANUP to a non-empty value.
// Alternatively, importers of the dockerutil package may set the variable to true.
// Because dockerutil is an internal package, the public API for setting this value
// is interchaintest.KeepDockerVolumesOnFailure(bool).
var KeepVolumesOnFailure = os.Getenv("IBCTEST_SKIP_FAILURE_CLEANUP") != ""
var KeepVolumesOnFailure = os.Getenv("ICTEST_SKIP_FAILURE_CLEANUP") != ""

// DockerSetup returns a new Docker Client and the ID of a configured network, associated with t.
//
Expand Down
4 changes: 2 additions & 2 deletions docs/retainingDataOnFailedTests.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ By default, failed tests will clean up any temporary directories they created.
Sometimes when debugging a failed test, it can be more helpful to leave the directory behind
for further manual inspection.

Setting the environment variable `IBCTEST_SKIP_FAILURE_CLEANUP` to any non-empty value
Setting the environment variable `ICTEST_SKIP_FAILURE_CLEANUP` to any non-empty value
will cause the test to skip deletion of the temporary directories.
Any tests that fail and skip cleanup will log a message like
`Not removing temporary directory for test at: /tmp/...`.
Expand All @@ -14,4 +14,4 @@ Test authors must use
instead of `(*testing.T).Cleanup` to opt in to this behavior.

By default, Docker volumes associated with tests are cleaned up at the end of each test run.
That same `IBCTEST_SKIP_FAILURE_CLEANUP` controls whether the volumes associated with failed tests are pruned.
That same `ICTEST_SKIP_FAILURE_CLEANUP` controls whether the volumes associated with failed tests are pruned.
2 changes: 1 addition & 1 deletion examples/ibc/wasm/wasm_icq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
// the ICQ module is required to be present in order to receive interchain queries.
func TestInterchainQueriesWASM(t *testing.T) {
//TODO (1): force relayer to use specific versions of the chains configured in the file.
//os.Setenv("IBCTEST_CONFIGURED_CHAINS", "./icq_wasm_configured_chains.yaml")
//os.Setenv("ICTEST_CONFIGURED_CHAINS", "./icq_wasm_configured_chains.yaml")

//TODO (2): use Juno as sender "ghcr.io/strangelove-ventures/heighliner/juno:v10.1.0"
//and Strangelove's icqd (or another chain with ICQ module present) as receiver.
Expand Down
4 changes: 2 additions & 2 deletions tempdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ type TempDirTestingT interface {
// We export the function instead of the package-level variable
// for a consistent API in interchaintest with the KeepDockerVolumesOnFailure function,
// which references a variable in an internal package.
var keepTempDirOnFailure = os.Getenv("IBCTEST_SKIP_FAILURE_CLEANUP") != ""
var keepTempDirOnFailure = os.Getenv("ICTEST_SKIP_FAILURE_CLEANUP") != ""

// KeepTempDirOnFailure sets whether a directory created by TempDir
// is retained or deleted following a test failure.
//
// The value is false by default, but can be initialized to true by setting the
// environment variable IBCTEST_SKIP_FAILURE_CLEANUP to a non-empty value.
// environment variable ICTEST_SKIP_FAILURE_CLEANUP to a non-empty value.
// Alternatively, importers of the interchaintest package may set the variable to true.
func KeepTempDirOnFailure(b bool) {
keepTempDirOnFailure = b
Expand Down
2 changes: 1 addition & 1 deletion test_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (
// are retained or deleted following a test failure.
//
// The value is false by default, but can be initialized to true by setting the
// environment variable IBCTEST_SKIP_FAILURE_CLEANUP to a non-empty value.
// environment variable ICTEST_SKIP_FAILURE_CLEANUP to a non-empty value.
// Alternatively, importers of the interchaintest package may call KeepDockerVolumesOnFailure(true).
func KeepDockerVolumesOnFailure(b bool) {
dockerutil.KeepVolumesOnFailure = b
Expand Down

0 comments on commit 8258af7

Please sign in to comment.