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