This repository was archived by the owner on Jul 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 9
9
"os/exec"
10
10
"path/filepath"
11
11
"runtime"
12
+ "strings"
12
13
"testing"
13
14
14
15
"github.com/gotestyourself/gotestyourself/assert"
@@ -18,22 +19,24 @@ import (
18
19
)
19
20
20
21
var (
21
- dockerApp = ""
22
+ dockerApp = ""
23
+ hasExperimental = false
22
24
)
23
25
24
- func getBinary (t * testing.T ) string {
26
+ func getBinary (t * testing.T ) ( string , bool ) {
25
27
if dockerApp != "" {
26
- return dockerApp
28
+ return dockerApp , hasExperimental
27
29
}
28
30
binName := findBinary ()
29
31
if binName == "" {
30
32
t .Error ("cannot locate docker-app binary" )
31
33
}
32
34
cmd := exec .Command (binName , "version" )
33
- err := cmd .Run ()
35
+ output , err := cmd .CombinedOutput ()
34
36
assert .NilError (t , err , "failed to execute %s" , binName )
35
37
dockerApp = binName
36
- return dockerApp
38
+ hasExperimental = strings .Contains (string (output ), "Experimental: on" )
39
+ return dockerApp , hasExperimental
37
40
}
38
41
39
42
func findBinary () string {
Original file line number Diff line number Diff line change 16
16
// FullVersion returns a string of version information.
17
17
func FullVersion () string {
18
18
res := []string {
19
- fmt .Sprintf ("Version: %s" , Version ),
20
- fmt .Sprintf ("Git commit: %s" , GitCommit ),
21
- fmt .Sprintf ("OS/Arch: %s/%s" , runtime .GOOS , runtime .GOARCH ),
19
+ fmt .Sprintf ("Version: %s" , Version ),
20
+ fmt .Sprintf ("Git commit: %s" , GitCommit ),
21
+ fmt .Sprintf ("OS/Arch: %s/%s" , runtime .GOOS , runtime .GOARCH ),
22
+ fmt .Sprintf ("Experimental: %s" , Experimental ),
23
+ fmt .Sprintf ("Renderers: %s" , Renderers ),
22
24
}
23
25
return strings .Join (res , "\n " )
24
26
}
You can’t perform that action at this time.
0 commit comments