mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
feat(libstack): remove the docker-compose binary BE-10801 (#111)
Co-authored-by: andres-portainer <andres-portainer@users.noreply.github.com> Co-authored-by: oscarzhou <oscar.zhou@portainer.io>
This commit is contained in:
parent
55aa0c0c5d
commit
a7127bc74f
34 changed files with 913 additions and 761 deletions
|
@ -21,7 +21,7 @@ func checkPrerequisites(t *testing.T) {
|
|||
func Test_UpAndDown(t *testing.T) {
|
||||
checkPrerequisites(t)
|
||||
|
||||
deployer, _ := compose.NewComposeDeployer("", "")
|
||||
deployer := compose.NewComposeDeployer()
|
||||
|
||||
const composeFileContent = `
|
||||
version: "3.9"
|
||||
|
@ -69,7 +69,7 @@ func Test_UpAndDown(t *testing.T) {
|
|||
t.Fatal("container should exist")
|
||||
}
|
||||
|
||||
err = deployer.Remove(ctx, projectName, []string{filePathOriginal, filePathOverride}, libstack.Options{})
|
||||
err = deployer.Remove(ctx, projectName, []string{filePathOriginal, filePathOverride}, libstack.RemoveOptions{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
@ -81,14 +81,11 @@ func Test_UpAndDown(t *testing.T) {
|
|||
|
||||
func createFile(dir, fileName, content string) (string, error) {
|
||||
filePath := filepath.Join(dir, fileName)
|
||||
f, err := os.Create(filePath)
|
||||
if err != nil {
|
||||
|
||||
if err := os.WriteFile(filePath, []byte(content), 0644); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
f.WriteString(content)
|
||||
f.Close()
|
||||
|
||||
return filePath, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue