|
@@ -64,31 +64,29 @@ func main() {
|
|
|
Expect(len(Lines(output))).To(Equal(1))
|
|
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))
|
|
|
|
|
-
|
|
|
|
|
- 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!"))
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- It("removes container nginx", func() {
|
|
|
|
|
- output := NewDockerCommand("rm", nginxID).ExecOrDie()
|
|
|
|
|
- Expect(Lines(output)[0]).To(Equal(nginxID))
|
|
|
|
|
- })
|
|
|
|
|
- */
|
|
|
|
|
|
|
+ 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"))
|
|
|
|
|
+
|
|
|
|
|
+ // 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("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()
|