Commit 4c47cbc Domenico Luciani
committed
1 parent c16b038 commit 4c47cbc Copy full SHA for 4c47cbc
File tree 7 files changed +8
-8
lines changed
7 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,6 @@ func TestDetector(t *testing.T) {
36
36
info , err := h .DockerCli (t ).Info (context .TODO ())
37
37
h .AssertNil (t , err )
38
38
39
- // These variables are clones of the variables in analyzer_test.go.
40
- // You can find the same variables there without `builder` prefix.
41
- // These lines are added for supporting windows tests.
42
39
detectorDaemonOS = info .OSType
43
40
detectorDaemonArch = info .Architecture
44
41
if detectorDaemonArch == "x86_64" {
Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ func TestRebaser(t *testing.T) {
37
37
func testRebaser (platformAPI string ) func (t * testing.T , when spec.G , it spec.S ) {
38
38
return func (t * testing.T , when spec.G , it spec.S ) {
39
39
when ("called with insecure registry flag" , func () {
40
+ it .Before (func () {
41
+ h .SkipIf (t , api .MustParse (platformAPI ).LessThan ("0.12" ), "" )
42
+ })
40
43
it ("should do an http request" , func () {
41
44
insecureRegistry := "host.docker.internal"
42
45
rebaserOutputImageName := insecureRegistry + "/bar"
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ func (a *analyzeCmd) DefineFlags() {
40
40
cli .FlagLayoutDir (& a .LayoutDir )
41
41
cli .FlagUseLayout (& a .UseLayout )
42
42
cli .FlagRunPath (& a .RunPath )
43
+ cli .FlagInsecureRegistries (& a .InsecureRegistries )
43
44
fallthrough
44
45
case a .PlatformAPI .AtLeast ("0.9" ):
45
46
cli .FlagLaunchCacheDir (& a .LaunchCacheDir )
@@ -58,7 +59,6 @@ func (a *analyzeCmd) DefineFlags() {
58
59
cli .FlagUID (& a .UID )
59
60
cli .FlagUseDaemon (& a .UseDaemon )
60
61
}
61
- cli .FlagInsecureRegistries (& a .InsecureRegistries )
62
62
}
63
63
64
64
// Args validates arguments and flags, and fills in default values.
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ func (c *createCmd) DefineFlags() {
34
34
cli .FlagLayoutDir (& c .LayoutDir )
35
35
cli .FlagUseLayout (& c .UseLayout )
36
36
cli .FlagRunPath (& c .RunPath )
37
+ cli .FlagInsecureRegistries (& c .InsecureRegistries )
37
38
}
38
39
if c .PlatformAPI .AtLeast ("0.11" ) {
39
40
cli .FlagBuildConfigDir (& c .BuildConfigDir )
@@ -59,7 +60,6 @@ func (c *createCmd) DefineFlags() {
59
60
cli .FlagTags (& c .AdditionalTags )
60
61
cli .FlagUID (& c .UID )
61
62
cli .FlagUseDaemon (& c .UseDaemon )
62
- cli .FlagInsecureRegistries (& c .InsecureRegistries )
63
63
}
64
64
65
65
// Args validates arguments and flags, and fills in default values.
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ func (e *exportCmd) DefineFlags() {
55
55
cli .FlagLayoutDir (& e .LayoutDir )
56
56
cli .FlagRunPath (& e .RunPath )
57
57
cli .FlagUseLayout (& e .UseLayout )
58
+ cli .FlagInsecureRegistries (& e .InsecureRegistries )
58
59
} else {
59
60
cli .FlagStackPath (& e .StackPath )
60
61
}
@@ -76,7 +77,6 @@ func (e *exportCmd) DefineFlags() {
76
77
cli .FlagRunImage (& e .RunImageRef ) // FIXME: this flag isn't valid on Platform 0.7 and later
77
78
cli .FlagUID (& e .UID )
78
79
cli .FlagUseDaemon (& e .UseDaemon )
79
- cli .FlagInsecureRegistries (& e .InsecureRegistries )
80
80
81
81
cli .DeprecatedFlagRunImage (& e .DeprecatedRunImageRef ) // FIXME: this flag isn't valid on Platform 0.7 and later
82
82
}
Original file line number Diff line number Diff line change @@ -40,14 +40,14 @@ func (r *rebaseCmd) DefineFlags() {
40
40
cli .FlagUID (& r .UID )
41
41
cli .FlagUseDaemon (& r .UseDaemon )
42
42
cli .DeprecatedFlagRunImage (& r .DeprecatedRunImageRef )
43
- cli .FlagInsecureRegistries (& r .InsecureRegistries )
44
43
45
44
if r .PlatformAPI .AtLeast ("0.11" ) {
46
45
cli .FlagPreviousImage (& r .PreviousImageRef )
47
46
}
48
47
49
48
if r .PlatformAPI .AtLeast ("0.12" ) {
50
49
cli .FlagForceRebase (& r .ForceRebase )
50
+ cli .FlagInsecureRegistries (& r .InsecureRegistries )
51
51
}
52
52
}
53
53
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ func (r *restoreCmd) DefineFlags() {
41
41
if r .PlatformAPI .AtLeast ("0.12" ) {
42
42
cli .FlagUseDaemon (& r .UseDaemon )
43
43
cli .FlagGeneratedDir (& r .GeneratedDir )
44
+ cli .FlagInsecureRegistries (& r .InsecureRegistries )
44
45
}
45
46
if r .PlatformAPI .AtLeast ("0.10" ) {
46
47
cli .FlagBuildImage (& r .BuildImageRef )
@@ -55,7 +56,6 @@ func (r *restoreCmd) DefineFlags() {
55
56
cli .FlagGroupPath (& r .GroupPath )
56
57
cli .FlagLayersDir (& r .LayersDir )
57
58
cli .FlagUID (& r .UID )
58
- cli .FlagInsecureRegistries (& r .InsecureRegistries )
59
59
}
60
60
61
61
// Args validates arguments and flags, and fills in default values.
You can’t perform that action at this time.
0 commit comments