mirror of
https://github.com/docker/compose.git
synced 2025-07-13 08:44:33 +02:00
Enable "run->rm" cycle on e2e-aci
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
parent
7ff1899021
commit
b98f45eb28
@ -1,6 +1,7 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@ -34,7 +35,7 @@ func RmCommand() *cobra.Command {
|
|||||||
errs = append(errs, err.Error())
|
errs = append(errs, err.Error())
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
println(id)
|
fmt.Println(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(errs) > 0 {
|
if len(errs) > 0 {
|
||||||
|
@ -64,31 +64,29 @@ func main() {
|
|||||||
Expect(len(Lines(output))).To(Equal(1))
|
Expect(len(Lines(output))).To(Equal(1))
|
||||||
})
|
})
|
||||||
|
|
||||||
/*
|
var nginxID string
|
||||||
var nginxID string
|
It("runs nginx on port 80 (PORT NOT CHECKED YET!!! REMOVE THAT WHEN IMPLEMENTED)", func() {
|
||||||
It("runs nginx on port 80", func() {
|
NewDockerCommand("run", "nginx", "-p", "80:80").ExecOrDie()
|
||||||
NewDockerCommand("run", "nginx", "-p", "80:80").ExecOrDie()
|
output := NewDockerCommand("ps").ExecOrDie()
|
||||||
output := NewDockerCommand("ps").ExecOrDie()
|
lines := Lines(output)
|
||||||
Lines := Lines(output)
|
Expect(len(lines)).To(Equal(2))
|
||||||
Expect(len(Lines)).To(Equal(2))
|
|
||||||
|
|
||||||
containerFields := Columns(Lines[1])
|
containerFields := Columns(lines[1])
|
||||||
nginxID = containerFields[0]
|
nginxID = containerFields[0]
|
||||||
Expect(containerFields[1]).To(Equal("nginx"))
|
Expect(containerFields[1]).To(Equal("nginx"))
|
||||||
Expect(containerFields[2]).To(Equal("Running"))
|
Expect(containerFields[2]).To(Equal("Running"))
|
||||||
exposedIP := containerFields[3]
|
// exposedIP := containerFields[3]
|
||||||
Expect(exposedIP).To(ContainSubstring(":80->80/TCP"))
|
// Expect(exposedIP).To(ContainSubstring(":80->80/TCP"))
|
||||||
|
|
||||||
url := strings.ReplaceAll(exposedIP, "->80/TCP", "")
|
// url := strings.ReplaceAll(exposedIP, "->80/TCP", "")
|
||||||
output = NewCommand("curl", url).ExecOrDie()
|
// output = NewCommand("curl", url).ExecOrDie()
|
||||||
Expect(output).To(ContainSubstring("Welcome to nginx!"))
|
// Expect(output).To(ContainSubstring("Welcome to nginx!"))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("removes container nginx", func() {
|
It("removes container nginx", func() {
|
||||||
output := NewDockerCommand("rm", nginxID).ExecOrDie()
|
output := NewDockerCommand("rm", nginxID).ExecOrDie()
|
||||||
Expect(Lines(output)[0]).To(Equal(nginxID))
|
Expect(Lines(output)[0]).To(Equal(nginxID))
|
||||||
})
|
})
|
||||||
*/
|
|
||||||
|
|
||||||
It("deploys a compose app", func() {
|
It("deploys a compose app", func() {
|
||||||
NewDockerCommand("compose", "up", "-f", "./tests/composefiles/aci-demo/aci_demo_port.yaml", "--name", "acidemo").ExecOrDie()
|
NewDockerCommand("compose", "up", "-f", "./tests/composefiles/aci-demo/aci_demo_port.yaml", "--name", "acidemo").ExecOrDie()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user