mirror of
				https://github.com/docker/compose.git
				synced 2025-10-31 11:14:02 +01:00 
			
		
		
		
	ignore missing docker-compose cli-plugin, not required for ECS/ACI/Kube e2e tests
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
		
							parent
							
								
									41d5cfd219
								
							
						
					
					
						commit
						8e8122f255
					
				| @ -17,7 +17,6 @@ | |||||||
| package e2e | package e2e | ||||||
| 
 | 
 | ||||||
| import ( | import ( | ||||||
| 	"errors" |  | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"io" | 	"io" | ||||||
| 	"io/ioutil" | 	"io/ioutil" | ||||||
| @ -31,6 +30,7 @@ import ( | |||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
| 
 | 
 | ||||||
|  | 	"github.com/pkg/errors" | ||||||
| 	"gotest.tools/v3/assert" | 	"gotest.tools/v3/assert" | ||||||
| 	is "gotest.tools/v3/assert/cmp" | 	is "gotest.tools/v3/assert/cmp" | ||||||
| 	"gotest.tools/v3/icmd" | 	"gotest.tools/v3/icmd" | ||||||
| @ -90,10 +90,15 @@ func newE2eCLI(t *testing.T, binDir string) *E2eCLI { | |||||||
| 	if runtime.GOOS == "windows" { | 	if runtime.GOOS == "windows" { | ||||||
| 		composePluginFile += ".exe" | 		composePluginFile += ".exe" | ||||||
| 	} | 	} | ||||||
| 	composePlugin, _ := findExecutable(composePluginFile, []string{"../../bin", "../../../bin"}) | 	composePlugin, err := findExecutable(composePluginFile, []string{"../../bin", "../../../bin"}) | ||||||
| 	err = CopyFile(composePlugin, filepath.Join(d, "cli-plugins", composePluginFile)) | 	if os.IsNotExist(err) { | ||||||
| 	if err != nil { | 		fmt.Println("WARNING: docker-compose cli-plugin not found") | ||||||
| 		panic(err) | 	} | ||||||
|  | 	if err == nil { | ||||||
|  | 		err = CopyFile(composePlugin, filepath.Join(d, "cli-plugins", composePluginFile)) | ||||||
|  | 		if err != nil { | ||||||
|  | 			panic(err) | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	return &E2eCLI{binDir, d, t} | 	return &E2eCLI{binDir, d, t} | ||||||
| @ -158,7 +163,7 @@ func findExecutable(executableName string, paths []string) (string, error) { | |||||||
| 		return bin, nil | 		return bin, nil | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	return "", errors.New("executable not found") | 	return "", errors.Wrap(os.ErrNotExist, "executable not found") | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // CopyFile copies a file from a sourceFile to a destinationFile setting permissions to 0755 | // CopyFile copies a file from a sourceFile to a destinationFile setting permissions to 0755 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user