Test output of `docker run`

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
Ulysses Souza 2020-05-13 17:09:18 +02:00
parent 2d14bfeb38
commit 323601865d
1 changed files with 5 additions and 2 deletions

View File

@ -16,6 +16,8 @@ const (
resourceGroupName = "resourceGroupTest"
location = "westeurope"
contextName = "acitest"
testContainerName = "testcontainername"
)
func main() {
@ -66,8 +68,9 @@ func main() {
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()
output := NewDockerCommand("run", "nginx", "-p", "80:80", "--name", testContainerName).ExecOrDie()
Expect(output).To(Equal(testContainerName + "\n"))
output = NewDockerCommand("ps").ExecOrDie()
lines := Lines(output)
Expect(len(lines)).To(Equal(2))