mirror of
https://github.com/docker/compose.git
synced 2026-08-27 03:45:29 +00:00
Remove It() in e2e tests, simplified step declaration. Nicer test output for all tests
This commit is contained in:
parent
f62ab26714
commit
a2ea2347ba
5 changed files with 40 additions and 39 deletions
|
|
@ -21,7 +21,6 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/robpike/filter"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func nonEmptyString(s string) bool {
|
||||
|
|
@ -50,9 +49,3 @@ func GoldenFile(name string) string {
|
|||
func IsWindows() bool {
|
||||
return runtime.GOOS == "windows"
|
||||
}
|
||||
|
||||
// It runs func
|
||||
func It(description string, test func()) {
|
||||
test()
|
||||
logrus.Print("Passed: ", description)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/onsi/gomega"
|
||||
|
|
@ -133,6 +134,13 @@ func (s *Suite) NewCommand(command string, args ...string) *CmdContext {
|
|||
}
|
||||
}
|
||||
|
||||
// Step runs a step in a test, with an identified name and output in test results
|
||||
func (s *Suite) Step(name string, test func()) {
|
||||
s.T().Run(name, func(t *testing.T) {
|
||||
test()
|
||||
})
|
||||
}
|
||||
|
||||
func dockerExecutable() string {
|
||||
if IsWindows() {
|
||||
return "docker.exe"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue