From 73745d063910912f69be03a795bf45f09cdb33fa Mon Sep 17 00:00:00 2001 From: Urvi Date: Fri, 2 Aug 2024 10:16:18 -0700 Subject: [PATCH 1/3] services/horizon: migrate to docker compose v2 --- services/horizon/internal/test/integration/integration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/horizon/internal/test/integration/integration.go b/services/horizon/internal/test/integration/integration.go index 9884470d70..11f55dffa7 100644 --- a/services/horizon/internal/test/integration/integration.go +++ b/services/horizon/internal/test/integration/integration.go @@ -224,7 +224,7 @@ func (i *Test) runComposeCommand(args ...string) { cmdline = append([]string{"-f", integrationSorobanRPCYaml}, cmdline...) } cmdline = append([]string{"-f", integrationYaml}, cmdline...) - cmd := exec.Command("docker-compose", cmdline...) + cmd := exec.Command("docker compose", cmdline...) coreImageOverride := "" if i.config.CoreDockerImage != "" { coreImageOverride = i.config.CoreDockerImage From 7c0ce4cefe48fbd65d69427011dc2412c448ef36 Mon Sep 17 00:00:00 2001 From: Urvi Date: Fri, 2 Aug 2024 14:25:18 -0700 Subject: [PATCH 2/3] Ignore staticcheck for commands with spaces in them --- services/horizon/internal/test/integration/integration.go | 1 + 1 file changed, 1 insertion(+) diff --git a/services/horizon/internal/test/integration/integration.go b/services/horizon/internal/test/integration/integration.go index 11f55dffa7..ce785e61bd 100644 --- a/services/horizon/internal/test/integration/integration.go +++ b/services/horizon/internal/test/integration/integration.go @@ -224,6 +224,7 @@ func (i *Test) runComposeCommand(args ...string) { cmdline = append([]string{"-f", integrationSorobanRPCYaml}, cmdline...) } cmdline = append([]string{"-f", integrationYaml}, cmdline...) + //lint:ignore SA1005 commands with spaces! cmd := exec.Command("docker compose", cmdline...) coreImageOverride := "" if i.config.CoreDockerImage != "" { From 66db13ba8ff254620ab07833e9214ecc297b5d68 Mon Sep 17 00:00:00 2001 From: Urvi Date: Fri, 2 Aug 2024 14:48:00 -0700 Subject: [PATCH 3/3] workaround for running commands with spaces in them --- services/horizon/internal/test/integration/integration.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/horizon/internal/test/integration/integration.go b/services/horizon/internal/test/integration/integration.go index ce785e61bd..107cb33759 100644 --- a/services/horizon/internal/test/integration/integration.go +++ b/services/horizon/internal/test/integration/integration.go @@ -224,8 +224,8 @@ func (i *Test) runComposeCommand(args ...string) { cmdline = append([]string{"-f", integrationSorobanRPCYaml}, cmdline...) } cmdline = append([]string{"-f", integrationYaml}, cmdline...) - //lint:ignore SA1005 commands with spaces! - cmd := exec.Command("docker compose", cmdline...) + cmdline = append([]string{"compose"}, cmdline...) + cmd := exec.Command("docker", cmdline...) coreImageOverride := "" if i.config.CoreDockerImage != "" { coreImageOverride = i.config.CoreDockerImage