From dba738d5d40cef239ed8d1f25403b98d8977d70c Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Thu, 29 Aug 2024 16:10:18 +0200 Subject: [PATCH] itests: use `docker compose` if `docker-compose` is unavailable --- .../internal/integrationtest/infrastructure/test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/soroban-rpc/internal/integrationtest/infrastructure/test.go b/cmd/soroban-rpc/internal/integrationtest/infrastructure/test.go index 25e0fa4b..0a7b91ee 100644 --- a/cmd/soroban-rpc/internal/integrationtest/infrastructure/test.go +++ b/cmd/soroban-rpc/internal/integrationtest/infrastructure/test.go @@ -468,6 +468,11 @@ func (i *Test) getComposeCommand(args ...string) *exec.Cmd { cmdline = append([]string{"-p", projectName}, cmdline...) cmdline = append(cmdline, args...) cmd := exec.Command("docker-compose", cmdline...) + _, err := exec.LookPath("docker-compose") + if err != nil { + cmdline = append([]string{"compose"}, cmdline...) + cmd = exec.Command("docker", cmdline...) + } if img := os.Getenv("SOROBAN_RPC_INTEGRATION_TESTS_DOCKER_IMG"); img != "" { cmd.Env = append(