Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
"\\[APM\\]",
"\\[Error handling\\]",
"\\[Key\\]",
"\\[ICM\\]",
"\\[Network\\]",
"\\[Blockchain Configure\\]",
"\\[Package Management\\]",
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ test: fmt vet ## Run tests.

lint: ## Run golangci-lint against code.
golangci-lint run --path-prefix=.
gofumpt -w .

build: fmt vet ## Build avalanche CLI binary.
scripts/build.sh
Expand Down
2 changes: 1 addition & 1 deletion cmd/interchaincmd/messengercmd/send_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func sendMsg(_ *cobra.Command, args []string) error {
time.Sleep(arrivalCheckInterval)
}

ux.Logger.PrintToUser("Message successfully Teleported!")
ux.Logger.PrintToUser("Message successfully delivered!")

return nil
}
Expand Down
40 changes: 12 additions & 28 deletions tests/e2e/commands/icm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,25 @@
package commands

import (
"fmt"
"os/exec"

"github.com/ava-labs/avalanche-cli/pkg/constants"
"github.com/ava-labs/avalanche-cli/tests/e2e/utils"
"github.com/onsi/gomega"
)

const (
ICMCmd = "icm"
)

/* #nosec G204 */
func SendICMMessage(network, subnetOne, subnetTwo, message, key string) string {
// Create config
cmdArgs := []string{
ICMCmd,
"sendMsg",
network,
subnetOne,
subnetTwo,
message,
"--key",
key,
"--" + constants.SkipUpdateFlag,
}

cmd := exec.Command(CLIBinary, cmdArgs...)
output, err := cmd.CombinedOutput()
if err != nil {
fmt.Println(cmd.String())
fmt.Println(string(output))
utils.PrintStdErr(err)
}
gomega.Expect(err).Should(gomega.BeNil())
func SendICMMessage(args []string, testFlags utils.TestFlags) (string, error) {
return utils.TestCommand(utils.ICMCmd, "sendMsg", args, utils.GlobalFlags{
"local": true,
"skip-update-check": true,
}, testFlags)
}

return string(output)
/* #nosec G204 */
func DeployICMContracts(args []string, testFlags utils.TestFlags) (string, error) {
return utils.TestCommand(utils.ICMCmd, "deploy", args, utils.GlobalFlags{
"local": true,
"skip-update-check": true,
}, testFlags)
}
24 changes: 24 additions & 0 deletions tests/e2e/commands/relayer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// / Copyright (C) 2025, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package commands

import (
"github.com/ava-labs/avalanche-cli/tests/e2e/utils"
)

/* #nosec G204 */
func StopRelayer() (string, error) {
return utils.TestCommand(InterchainCMD, "relayer", []string{"stop"}, utils.GlobalFlags{
"local": true,
"skip-update-check": true,
}, utils.TestFlags{})
}

/* #nosec G204 */
func DeployRelayer(args []string, testFlags utils.TestFlags) (string, error) {
return utils.TestCommand(InterchainCMD, "relayer", args, utils.GlobalFlags{
"local": true,
"skip-update-check": true,
}, testFlags)
}
2 changes: 2 additions & 0 deletions tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (
_ "github.com/ava-labs/avalanche-cli/tests/e2e/testcases/apm"
_ "github.com/ava-labs/avalanche-cli/tests/e2e/testcases/blockchain/configure"
_ "github.com/ava-labs/avalanche-cli/tests/e2e/testcases/errhandling"
_ "github.com/ava-labs/avalanche-cli/tests/e2e/testcases/icm/deploy"
_ "github.com/ava-labs/avalanche-cli/tests/e2e/testcases/icm/sendMsg"
_ "github.com/ava-labs/avalanche-cli/tests/e2e/testcases/key/create"
_ "github.com/ava-labs/avalanche-cli/tests/e2e/testcases/key/delete"
_ "github.com/ava-labs/avalanche-cli/tests/e2e/testcases/key/export"
Expand Down
Loading
Loading