From 6571af38afbda261d8da6bcba909b1fae6708bcb Mon Sep 17 00:00:00 2001 From: hemz10 Date: Mon, 25 Sep 2023 17:45:21 +0530 Subject: [PATCH 1/6] refactor: refactor test cases structure --- test/functional/dive_test.go | 339 ++++++++++++++++++----------------- 1 file changed, 175 insertions(+), 164 deletions(-) diff --git a/test/functional/dive_test.go b/test/functional/dive_test.go index 54913cae..132845a8 100644 --- a/test/functional/dive_test.go +++ b/test/functional/dive_test.go @@ -100,12 +100,11 @@ var _ = ginkgo.Describe("DIVE CLI App", func() { }) - ginkgo.Describe("Functional Tests", func() { + ginkgo.Describe("Bridge command Test", func() { ginkgo.It("should start bridge between icon and eth but with icon bridge set to true", func() { cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "icon", "--chainB", "eth", "--bmvbridge") err := cmd.Run() gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) ginkgo.It("should start bridge between icon and eth with verbose flag enabled", func() { @@ -145,92 +144,6 @@ var _ = ginkgo.Describe("DIVE CLI App", func() { gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) - ginkgo.It("should run single icon node", func() { - cmd.Args = append(cmd.Args, "chain", "icon") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run single icon node with verbose flag enabled", func() { - cmd.Args = append(cmd.Args, "chain", "icon", "--verbose") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run single icon node along with decentralisation", func() { - cmd.Args = append(cmd.Args, "chain", "icon", "-d") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run single icon node along with decentralisation with verbose flag enabled", func() { - cmd.Args = append(cmd.Args, "chain", "icon", "-d", "--verbose") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run single eth node", func() { - cmd.Args = append(cmd.Args, "chain", "eth") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run single eth node with verbose flag enabled", func() { - cmd.Args = append(cmd.Args, "chain", "eth", "--verbose") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run single hardhat node", func() { - cmd.Args = append(cmd.Args, "chain", "hardhat") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run single hardhat node with verbose flag enabled", func() { - cmd.Args = append(cmd.Args, "chain", "hardhat", "--verbose") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run custom Icon node", func() { - cmd.Args = append(cmd.Args, "chain", "icon", "-c", "../../cli/sample-jsons/config0.json", "-g", "../../services/jvm/icon/static-files/config/genesis-icon-0.zip") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run custom Icon node with verbose flag enabled", func() { - cmd.Args = append(cmd.Args, "chain", "icon", "-c", "../../cli/sample-jsons/config0.json", "-g", "../../services/jvm/icon/static-files/config/genesis-icon-0.zip", "--verbose") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run custom Icon node-1", func() { - cmd.Args = append(cmd.Args, "chain", "icon", "-c", "../../cli/sample-jsons/config1.json", "-g", "../../services/jvm/icon/static-files/config/genesis-icon-1.zip") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run custom Icon node-1 with verbose flag enabled", func() { - cmd.Args = append(cmd.Args, "chain", "icon", "-c", "../../cli/sample-jsons/config1.json", "-g", "../../services/jvm/icon/static-files/config/genesis-icon-1.zip", "--verbose") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run icon node first and then decentralise it", func() { - dive.RunIconNode() - cmd.Args = append(cmd.Args, "chain", "icon", "decentralize", "-p", "gochain", "-k", "keystores/keystore.json", "-n", "0x3", "-e", "http://172.16.0.3:9080/api/v3/icon_dex", "-s", "icon-node-0xacbc4e") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run icon node first and then decentralise it with verbose flag enabled", func() { - dive.RunIconNode() - cmd.Args = append(cmd.Args, "chain", "icon", "decentralize", "-p", "gochain", "-k", "keystores/keystore.json", "-n", "0x3", "-e", "http://172.16.0.3:9080/api/v3/icon_dex", "-s", "icon-node-0xacbc4e", "--verbose") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - ginkgo.It("should start bridge between icon and eth by running each chain individually ", func() { dive.RunDecentralizedIconNode() dive.RunEthNode() @@ -319,6 +232,84 @@ var _ = ginkgo.Describe("DIVE CLI App", func() { gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) + ginkgo.It("should handle invalid input for bridge command", func() { + cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "icon", "--chainB", "invalid_input") + err := cmd.Run() + gomega.Expect(err).To(gomega.HaveOccurred()) + }) + + ginkgo.It("should handle invalid input for bridge command", func() { + cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "invalid_input", "--chainB", "eth") + err := cmd.Run() + gomega.Expect(err).To(gomega.HaveOccurred()) + }) + + ginkgo.It("should handle invalid input ibc bridge command", func() { + cmd.Args = append(cmd.Args, "bridge", "ibc", "--chainA", "archway", "--chainB", "invalid") + err := cmd.Run() + gomega.Expect(err).To(gomega.HaveOccurred()) + }) + + ginkgo.It("should start bridge between archway and archway by running one custom archway chain", func() { + dive.RunArchwayNode() + dive.RunCustomArchwayNode1() + cmd.Args = append(cmd.Args, "bridge", "ibc", "--chainA", "archway", "--chainB", "archway", "--chainAServiceName", "node-service-constantine-3", "--chainBServiceName", "node-service-archway-node-1") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should start bridge between 2 custom archway chains", func() { + dive.RunCustomArchwayNode0() + dive.RunCustomArchwayNode1() + cmd.Args = append(cmd.Args, "bridge", "ibc", "--chainA", "archway", "--chainB", "archway", "--chainAServiceName", "node-service-archway-node-0", "--chainBServiceName", "node-service-archway-node-1") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should start bridge between 1 custom chain and running bridge command", func() { + dive.RunCustomArchwayNode1() + cmd.Args = append(cmd.Args, "bridge", "ibc", "--chainA", "archway", "--chainB", "archway", "--chainBServiceName", "node-service-archway-node-1") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should start bridge between icon and hardhat by running icon node first and running bridge command directly", func() { + dive.RunDecentralizedCustomIconNode0() + cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "icon", "--chainB", "hardhat", "--chainAServiceName", "icon-node-0xacbc4e") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should start bridge between icon and hardhat by running hardhat node first and running bridge command directly", func() { + dive.RunHardhatNode() + cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "hardhat", "--chainB", "icon", "--chainAServiceName", "hardhat-node") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should start bridge between icon and eth by running icon node first and running bridge command directly", func() { + dive.RunDecentralizedCustomIconNode0() + cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "icon", "--chainB", "eth", "--chainAServiceName", "icon-node-0xacbc4e") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should start bridge between icon and eth by running eth node first and running bridge command directly", func() { + dive.RunEthNode() + cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "eth", "--chainB", "icon", "--chainAServiceName", "el-1-geth-lighthouse") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should start bridge between icon and icon by running icon node first and running bridge command directly", func() { + dive.RunDecentralizedCustomIconNode0() + cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "icon", "--chainB", "icon", "--chainAServiceName", "icon-node-0xacbc4e") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + }) + + ginkgo.Describe("Other commands", func() { ginkgo.It("should handle error when trying to clean if no enclaves are running", func() { dive.Clean() dive.Clean() @@ -335,22 +326,74 @@ var _ = ginkgo.Describe("DIVE CLI App", func() { cmd3.Run() }) - ginkgo.It("should handle invalid input for bridge command", func() { - cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "icon", "--chainB", "invalid_input") + ginkgo.It("should handle invalid input for chain command", func() { + cmd.Args = append(cmd.Args, "chain", "invalid_input") err := cmd.Run() gomega.Expect(err).To(gomega.HaveOccurred()) }) + }) - ginkgo.It("should handle invalid input for bridge command", func() { - cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "invalid_input", "--chainB", "eth") + ginkgo.Describe("Icon chain commands", func() { + ginkgo.It("should run single icon node", func() { + cmd.Args = append(cmd.Args, "chain", "icon") err := cmd.Run() - gomega.Expect(err).To(gomega.HaveOccurred()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) - ginkgo.It("should handle invalid input for chain command", func() { - cmd.Args = append(cmd.Args, "chain", "invalid_input") + ginkgo.It("should run single icon node with verbose flag enabled", func() { + cmd.Args = append(cmd.Args, "chain", "icon", "--verbose") err := cmd.Run() - gomega.Expect(err).To(gomega.HaveOccurred()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should run single icon node along with decentralisation", func() { + cmd.Args = append(cmd.Args, "chain", "icon", "-d") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should run single icon node along with decentralisation with verbose flag enabled", func() { + cmd.Args = append(cmd.Args, "chain", "icon", "-d", "--verbose") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should run custom Icon node", func() { + cmd.Args = append(cmd.Args, "chain", "icon", "-c", "../../cli/sample-jsons/config0.json", "-g", "../../services/jvm/icon/static-files/config/genesis-icon-0.zip") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should run custom Icon node with verbose flag enabled", func() { + cmd.Args = append(cmd.Args, "chain", "icon", "-c", "../../cli/sample-jsons/config0.json", "-g", "../../services/jvm/icon/static-files/config/genesis-icon-0.zip", "--verbose") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should run custom Icon node-1", func() { + cmd.Args = append(cmd.Args, "chain", "icon", "-c", "../../cli/sample-jsons/config1.json", "-g", "../../services/jvm/icon/static-files/config/genesis-icon-1.zip") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should run custom Icon node-1 with verbose flag enabled", func() { + cmd.Args = append(cmd.Args, "chain", "icon", "-c", "../../cli/sample-jsons/config1.json", "-g", "../../services/jvm/icon/static-files/config/genesis-icon-1.zip", "--verbose") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should run icon node first and then decentralise it", func() { + dive.RunIconNode() + cmd.Args = append(cmd.Args, "chain", "icon", "decentralize", "-p", "gochain", "-k", "keystores/keystore.json", "-n", "0x3", "-e", "http://172.16.0.3:9080/api/v3/icon_dex", "-s", "icon-node-0xacbc4e") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + }) + + ginkgo.It("should run icon node first and then decentralise it with verbose flag enabled", func() { + dive.RunIconNode() + cmd.Args = append(cmd.Args, "chain", "icon", "decentralize", "-p", "gochain", "-k", "keystores/keystore.json", "-n", "0x3", "-e", "http://172.16.0.3:9080/api/v3/icon_dex", "-s", "icon-node-0xacbc4e", "--verbose") + err := cmd.Run() + gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) ginkgo.It("should handle invalid input for chain command", func() { @@ -406,78 +449,46 @@ var _ = ginkgo.Describe("DIVE CLI App", func() { gomega.Expect(err).To(gomega.HaveOccurred()) }) - ginkgo.It("should handle invalid input ibc bridge command", func() { - cmd.Args = append(cmd.Args, "bridge", "ibc", "--chainA", "archway", "--chainB", "invalid") - err := cmd.Run() - gomega.Expect(err).To(gomega.HaveOccurred()) - }) - - ginkgo.It("should run single archway node", func() { - dive.RunArchwayNode() - }) - - ginkgo.It("should run single archway node with verbose flag enabled", func() { - cmd.Args = append(cmd.Args, "chain", "archway", "--verbose") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) - - ginkgo.It("should run single custom archway node", func() { - dive.RunCustomArchwayNode0() - }) - - ginkgo.It("should run single custom archway node with verbose flag enabled", func() { - cmd.Args = append(cmd.Args, "chain", "archway", "-c", "../../cli/sample-jsons/archway.json", "--verbose") + ginkgo.It("should output user that chain is already running when trying to run icon chain that is already running", func() { + dive.RunIconNode() + cmd.Args = append(cmd.Args, "chain", "icon") err := cmd.Run() gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) - ginkgo.It("should run single custom archway node with invalid json path", func() { - cmd.Args = append(cmd.Args, "chain", "archway", "-c", "../../cli/sample-jsons/archway4.json") - err := cmd.Run() - gomega.Expect(err).To(gomega.HaveOccurred()) - }) + }) - ginkgo.It("should start bridge between archway and archway by running one custom archway chain", func() { - dive.RunArchwayNode() - dive.RunCustomArchwayNode1() - cmd.Args = append(cmd.Args, "bridge", "ibc", "--chainA", "archway", "--chainB", "archway", "--chainAServiceName", "node-service-archway-node-0", "--chainBServiceName", "node-service-archway-node-1") + ginkgo.Describe("Eth chain commands", func() { + ginkgo.It("should run single eth node", func() { + cmd.Args = append(cmd.Args, "chain", "eth") err := cmd.Run() gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) - ginkgo.It("should start bridge between 2 custom archway chains", func() { - dive.RunCustomArchwayNode0() - dive.RunCustomArchwayNode1() - cmd.Args = append(cmd.Args, "bridge", "ibc", "--chainA", "archway", "--chainB", "archway", "--chainAServiceName", "node-service-archway-node-0", "--chainBServiceName", "node-service-archway-node-1") + ginkgo.It("should run single eth node with verbose flag enabled", func() { + cmd.Args = append(cmd.Args, "chain", "eth", "--verbose") err := cmd.Run() gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) - ginkgo.It("should start bridge between 1 custom chain and running bridge command", func() { - dive.RunCustomArchwayNode1() - cmd.Args = append(cmd.Args, "bridge", "ibc", "--chainA", "archway", "--chainB", "archway", "--chainBServiceName", "node-service-archway-node-1") + ginkgo.It("should output user that chain is already running when trying to run eth chain that is already running", func() { + dive.RunEthNode() + cmd.Args = append(cmd.Args, "chain", "eth") err := cmd.Run() gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) - ginkgo.It("should output user that chain is already running when trying to run archway chain that is already running", func() { - dive.RunArchwayNode() - cmd.Args = append(cmd.Args, "chain", "archway") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) - }) + }) - ginkgo.It("should output user that chain is already running when trying to run icon chain that is already running", func() { - dive.RunIconNode() - cmd.Args = append(cmd.Args, "chain", "icon") + ginkgo.Describe("Hardhat chain commands", func() { + ginkgo.It("should run single hardhat node", func() { + cmd.Args = append(cmd.Args, "chain", "hardhat") err := cmd.Run() gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) - ginkgo.It("should output user that chain is already running when trying to run eth chain that is already running", func() { - dive.RunEthNode() - cmd.Args = append(cmd.Args, "chain", "eth") + ginkgo.It("should run single hardhat node with verbose flag enabled", func() { + cmd.Args = append(cmd.Args, "chain", "hardhat", "--verbose") err := cmd.Run() gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) @@ -488,38 +499,38 @@ var _ = ginkgo.Describe("DIVE CLI App", func() { err := cmd.Run() gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) + }) - ginkgo.It("should start bridge between icon and hardhat by running icon node first and running bridge command directly", func() { - dive.RunDecentralizedCustomIconNode0() - cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "icon", "--chainB", "hardhat", "--chainAServiceName", "icon-node-0xacbc4e") - err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) + ginkgo.Describe("Archway chain commands", func() { + ginkgo.It("should run single archway node", func() { + dive.RunArchwayNode() }) - ginkgo.It("should start bridge between icon and hardhat by running hardhat node first and running bridge command directly", func() { - dive.RunHardhatNode() - cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "hardhat", "--chainB", "icon", "--chainAServiceName", "hardhat-node") + ginkgo.It("should run single archway node with verbose flag enabled", func() { + cmd.Args = append(cmd.Args, "chain", "archway", "--verbose") err := cmd.Run() gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) - ginkgo.It("should start bridge between icon and eth by running icon node first and running bridge command directly", func() { - dive.RunDecentralizedCustomIconNode0() - cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "icon", "--chainB", "eth", "--chainAServiceName", "icon-node-0xacbc4e") + ginkgo.It("should run single custom archway node", func() { + dive.RunCustomArchwayNode0() + }) + + ginkgo.It("should run single custom archway node with verbose flag enabled", func() { + cmd.Args = append(cmd.Args, "chain", "archway", "-c", "../../cli/sample-jsons/archway.json", "--verbose") err := cmd.Run() gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) - ginkgo.It("should start bridge between icon and eth by running eth node first and running bridge command directly", func() { - dive.RunEthNode() - cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "eth", "--chainB", "icon", "--chainAServiceName", "el-1-geth-lighthouse") + ginkgo.It("should run single custom archway node with invalid json path", func() { + cmd.Args = append(cmd.Args, "chain", "archway", "-c", "../../cli/sample-jsons/archway4.json") err := cmd.Run() - gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(err).To(gomega.HaveOccurred()) }) - ginkgo.It("should start bridge between icon and icon by running icon node first and running bridge command directly", func() { - dive.RunDecentralizedCustomIconNode0() - cmd.Args = append(cmd.Args, "bridge", "btp", "--chainA", "icon", "--chainB", "icon", "--chainAServiceName", "icon-node-0xacbc4e") + ginkgo.It("should output user that chain is already running when trying to run archway chain that is already running", func() { + dive.RunArchwayNode() + cmd.Args = append(cmd.Args, "chain", "archway") err := cmd.Run() gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) From 146044293a1a12d9de6f92c42731aebddf323b27 Mon Sep 17 00:00:00 2001 From: hemz10 Date: Mon, 25 Sep 2023 17:45:47 +0530 Subject: [PATCH 2/6] test: update make file to run workflow --- test/Makefile | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/test/Makefile b/test/Makefile index fa563f3c..025365fc 100644 --- a/test/Makefile +++ b/test/Makefile @@ -40,9 +40,29 @@ run-smoke: BINARY @echo "Running Smoke test cases" @cd $(CURDIR)/functional && ginkgo --focus="Smoke Tests" -v -run-functional: BINARY - @echo "Running all functional test cases" - @cd $(CURDIR)/functional && ginkgo --focus="Functional Tests" -v -timeout=3h +run-bridge: BINARY + @echo "Running all bridge test cases" + @cd $(CURDIR)/functional && ginkgo --focus="Bridge command Test" -v -timeout=3h + +run-icon: BINARY + @echo "Running icon chain commands test cases" + @cd $(CURDIR)/functional && ginkgo --focus="Icon chain commands" -v -timeout=3h + +run-eth: BINARY + @echo "Running eth chain commands test cases" + @cd $(CURDIR)/functional && ginkgo --focus="Eth chain commands" -v -timeout=3h + +run-hardhat: BINARY + @echo "Running hardhat chain commands test cases" + @cd $(CURDIR)/functional && ginkgo --focus="Hardhat chain commands" -v -timeout=3h + +run-archway: BINARY + @echo "Running archway chain commands test cases" + @cd $(CURDIR)/functional && ginkgo --focus="Archway chain commands" -v -timeout=3h + +run-misc: BINARY + @echo "Running other test cases" + @cd $(CURDIR)/functional && ginkgo --focus="Other commands" -v -timeout=3h BINARY: GINKGO @cd $(CURDIR)/../cli && go build -o dive From 1e2c9038e652edf1348867e817cc2348958d58b2 Mon Sep 17 00:00:00 2001 From: hemz10 Date: Mon, 25 Sep 2023 17:46:21 +0530 Subject: [PATCH 3/6] test: update port for archway chain config --- cli/sample-jsons/archway1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/sample-jsons/archway1.json b/cli/sample-jsons/archway1.json index 1cc79a1b..682bca30 100644 --- a/cli/sample-jsons/archway1.json +++ b/cli/sample-jsons/archway1.json @@ -7,7 +7,7 @@ "private_rpc": 26657, "public_grpc": 9080, "public_http": 9092, - "public_tcp": 26658, + "public_tcp": 26659, "public_rpc": 4566, "password": "password" } From 752da1883fd3b3bdd9de61094bc224c743a503f5 Mon Sep 17 00:00:00 2001 From: hemz10 Date: Mon, 25 Sep 2023 17:46:56 +0530 Subject: [PATCH 4/6] test: add yaml files for commands --- .github/workflows/archway-chain-test.yaml | 29 +++++++++++++++++++ ...{functional-test.yaml => bridge-test.yaml} | 4 +-- .github/workflows/eth-chain-test .yaml | 29 +++++++++++++++++++ .github/workflows/hardhat-chain-test.yaml | 29 +++++++++++++++++++ .github/workflows/icon-chain-test.yaml | 29 +++++++++++++++++++ .github/workflows/misc-cmd-test.yaml | 29 +++++++++++++++++++ 6 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/archway-chain-test.yaml rename .github/workflows/{functional-test.yaml => bridge-test.yaml} (88%) create mode 100644 .github/workflows/eth-chain-test .yaml create mode 100644 .github/workflows/hardhat-chain-test.yaml create mode 100644 .github/workflows/icon-chain-test.yaml create mode 100644 .github/workflows/misc-cmd-test.yaml diff --git a/.github/workflows/archway-chain-test.yaml b/.github/workflows/archway-chain-test.yaml new file mode 100644 index 00000000..f7344db2 --- /dev/null +++ b/.github/workflows/archway-chain-test.yaml @@ -0,0 +1,29 @@ +name: Functional test + +on: + workflow_dispatch: + +jobs: + functional_test: + name: Functional Testing + runs-on: "ubuntu-latest" + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21 + + - name: Installing Kurtosis CLI and starting the kurtosis engine + run: | + echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list + sudo apt update + sudo apt install kurtosis-cli + kurtosis engine start + + - name: Running archway chain command tests + run: | + cd test && make run-archway \ No newline at end of file diff --git a/.github/workflows/functional-test.yaml b/.github/workflows/bridge-test.yaml similarity index 88% rename from .github/workflows/functional-test.yaml rename to .github/workflows/bridge-test.yaml index ec6eee1f..788b9adf 100644 --- a/.github/workflows/functional-test.yaml +++ b/.github/workflows/bridge-test.yaml @@ -24,6 +24,6 @@ jobs: sudo apt install kurtosis-cli kurtosis engine start - - name: Running functional tests + - name: Running bridge command tests run: | - cd test && make run-functional \ No newline at end of file + cd test && make run-bridge \ No newline at end of file diff --git a/.github/workflows/eth-chain-test .yaml b/.github/workflows/eth-chain-test .yaml new file mode 100644 index 00000000..3ee61990 --- /dev/null +++ b/.github/workflows/eth-chain-test .yaml @@ -0,0 +1,29 @@ +name: Functional test + +on: + workflow_dispatch: + +jobs: + functional_test: + name: Functional Testing + runs-on: "ubuntu-latest" + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21 + + - name: Installing Kurtosis CLI and starting the kurtosis engine + run: | + echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list + sudo apt update + sudo apt install kurtosis-cli + kurtosis engine start + + - name: Running eth chain command tests + run: | + cd test && make run-eth \ No newline at end of file diff --git a/.github/workflows/hardhat-chain-test.yaml b/.github/workflows/hardhat-chain-test.yaml new file mode 100644 index 00000000..190a6ba8 --- /dev/null +++ b/.github/workflows/hardhat-chain-test.yaml @@ -0,0 +1,29 @@ +name: Functional test + +on: + workflow_dispatch: + +jobs: + functional_test: + name: Functional Testing + runs-on: "ubuntu-latest" + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21 + + - name: Installing Kurtosis CLI and starting the kurtosis engine + run: | + echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list + sudo apt update + sudo apt install kurtosis-cli + kurtosis engine start + + - name: Running hardhat chain command tests + run: | + cd test && make run-hardhat \ No newline at end of file diff --git a/.github/workflows/icon-chain-test.yaml b/.github/workflows/icon-chain-test.yaml new file mode 100644 index 00000000..7525e62e --- /dev/null +++ b/.github/workflows/icon-chain-test.yaml @@ -0,0 +1,29 @@ +name: Functional test + +on: + workflow_dispatch: + +jobs: + functional_test: + name: Functional Testing + runs-on: "ubuntu-latest" + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21 + + - name: Installing Kurtosis CLI and starting the kurtosis engine + run: | + echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list + sudo apt update + sudo apt install kurtosis-cli + kurtosis engine start + + - name: Running icon chain command tests + run: | + cd test && make run-icon \ No newline at end of file diff --git a/.github/workflows/misc-cmd-test.yaml b/.github/workflows/misc-cmd-test.yaml new file mode 100644 index 00000000..66301b28 --- /dev/null +++ b/.github/workflows/misc-cmd-test.yaml @@ -0,0 +1,29 @@ +name: Functional test + +on: + workflow_dispatch: + +jobs: + functional_test: + name: Functional Testing + runs-on: "ubuntu-latest" + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21 + + - name: Installing Kurtosis CLI and starting the kurtosis engine + run: | + echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list + sudo apt update + sudo apt install kurtosis-cli + kurtosis engine start + + - name: Running other command tests + run: | + cd test && make run-misc \ No newline at end of file From a811eb2e8e86ad69a093e58465ca80ac7bbf2a85 Mon Sep 17 00:00:00 2001 From: hemz10 Date: Mon, 25 Sep 2023 17:50:24 +0530 Subject: [PATCH 5/6] chore: update go mod file to latest --- cli/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/go.mod b/cli/go.mod index a65f24a0..c5238d53 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -6,7 +6,7 @@ require ( github.com/briandowns/spinner v1.23.0 github.com/fatih/color v1.15.0 github.com/google/go-github v17.0.0+incompatible - github.com/kurtosis-tech/kurtosis/api/golang v0.83.4 + github.com/kurtosis-tech/kurtosis/api/golang v0.83.5 github.com/kurtosis-tech/stacktrace v0.0.0-20211028211901-1c67a77b5409 github.com/natefinch/lumberjack v2.0.0+incompatible github.com/sirupsen/logrus v1.9.3 From efbb350e6c153194ad0147dc1c563467a7970761 Mon Sep 17 00:00:00 2001 From: hemz10 Date: Mon, 25 Sep 2023 17:51:01 +0530 Subject: [PATCH 6/6] chore: update go mod file --- cli/go.mod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/go.mod b/cli/go.mod index c5238d53..1ed0a9f9 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -18,11 +18,13 @@ require ( github.com/BurntSushi/toml v1.3.2 // indirect github.com/adrg/xdg v0.4.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/ghodss/yaml v1.0.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/kurtosis-tech/kurtosis/contexts-config-store v0.0.0-20230818184218-f4e3e773463b // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/objx v0.5.0 // indirect github.com/stretchr/testify v1.8.4 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect )