@@ -42,15 +42,17 @@ func TestComposeRunDdev(t *testing.T) {
4242 // ddev shells out to `docker` and `docker-compose` (standalone), so a
4343 // temporary directory is created with symlinks to system Docker and the
4444 // locally-built standalone Compose binary to use as PATH
45+ requiredTools := []string {
46+ findToolInPath (t , DockerExecutableName ),
47+ ComposeStandalonePath (t ),
48+ findToolInPath (t , "tar" ),
49+ findToolInPath (t , "gzip" ),
50+ }
4551 pathDir := t .TempDir ()
46- dockerBin , err := exec .LookPath (DockerExecutableName )
47- require .NoError (t , err , "Could not find %q in path" , DockerExecutableName )
48- require .NoError (t , os .Symlink (dockerBin , filepath .Join (pathDir , DockerExecutableName )),
49- "Could not create %q symlink" , DockerExecutableName )
50-
51- composeBin := ComposeStandalonePath (t )
52- require .NoError (t , os .Symlink (composeBin , filepath .Join (pathDir , DockerComposeExecutableName )),
53- "Could not create %q symlink" , DockerComposeExecutableName )
52+ for _ , tool := range requiredTools {
53+ require .NoError (t , os .Symlink (tool , filepath .Join (pathDir , filepath .Base (tool ))),
54+ "Could not create symlink for %q" , tool )
55+ }
5456
5557 c := NewCLI (t , WithEnv (
5658 "DDEV_DEBUG=true" ,
@@ -97,3 +99,10 @@ func TestComposeRunDdev(t *testing.T) {
9799 fmt .Println (out )
98100 assert .Assert (t , strings .Contains (out , "ddev is working" ), "Could not start project" )
99101}
102+
103+ func findToolInPath (t testing.TB , name string ) string {
104+ t .Helper ()
105+ binPath , err := exec .LookPath (name )
106+ require .NoError (t , err , "Could not find %q in path" , name )
107+ return binPath
108+ }
0 commit comments