Merge pull request #87 from ulyssessouza/add-run-output

Test output of `docker run`
This commit is contained in:
Ulysses Souza 2020-05-14 11:06:14 +02:00 committed by GitHub
commit 4377bceb70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

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