initial version of cli integration tests

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Upstream-commit: 6db32fdefdae49843ed9535b3af1099e6bd2755d
Component: engine
This commit is contained in:
unclejack
2014-02-25 18:17:48 +02:00
parent 9b7d158e2c
commit 624997be0f
22 changed files with 1117 additions and 2 deletions

View File

@ -0,0 +1,25 @@
package main
import (
"fmt"
"os/exec"
"strings"
"testing"
)
// search for repos named "registry" on the central registry
func TestSearchOnCentralRegistry(t *testing.T) {
searchCmd := exec.Command(dockerBinary)
out, exitCode, err := runCommandWithOutput(searchCmd)
errorOut(err, t, fmt.Sprintf("encountered error while searching: %v", err))
if err != nil || exitCode != 0 {
t.Fatal("failed to search on the central registry")
}
if !strings.Contains(out, "registry") {
t.Fatal("couldn't find any repository named (or containing) 'registry'")
}
logDone("search - search for repositories named (or containing) 'registry'")
}