99 "net"
1010 "net/http"
1111 "net/http/httptest"
12- "os"
1312 "path/filepath"
1413 "runtime"
1514 "strings"
@@ -19,7 +18,6 @@ import (
1918 "github.com/docker/cli/cli/config"
2019 "github.com/docker/cli/cli/config/configfile"
2120 "github.com/docker/cli/cli/flags"
22- "github.com/docker/cli/cli/streams"
2321 "github.com/docker/docker/api"
2422 "github.com/docker/docker/api/types"
2523 "github.com/docker/docker/client"
@@ -256,46 +254,6 @@ func TestInitializeFromClientHangs(t *testing.T) {
256254 }
257255}
258256
259- // The CLI no longer disables/hides experimental CLI features, however, we need
260- // to verify that existing configuration files do not break
261- func TestExperimentalCLI (t * testing.T ) {
262- defaultVersion := "v1.55"
263-
264- testcases := []struct {
265- doc string
266- configfile string
267- }{
268- {
269- doc : "default" ,
270- configfile : `{}` ,
271- },
272- {
273- doc : "experimental" ,
274- configfile : `{
275- "experimental": "enabled"
276- }` ,
277- },
278- }
279-
280- for _ , tc := range testcases {
281- t .Run (tc .doc , func (t * testing.T ) {
282- dir := fs .NewDir (t , tc .doc , fs .WithFile ("config.json" , tc .configfile ))
283- defer dir .Remove ()
284- apiclient := & fakeClient {
285- version : defaultVersion ,
286- pingFunc : func () (types.Ping , error ) {
287- return types.Ping {Experimental : true , OSType : "linux" , APIVersion : defaultVersion }, nil
288- },
289- }
290-
291- cli := & DockerCli {client : apiclient , err : streams .NewOut (os .Stderr )}
292- config .SetDir (dir .Path ())
293- err := cli .Initialize (flags .NewClientOptions ())
294- assert .NilError (t , err )
295- })
296- }
297- }
298-
299257func TestNewDockerCliAndOperators (t * testing.T ) {
300258 // Test default operations and also overriding default ones
301259 cli , err := NewDockerCli (WithInputStream (io .NopCloser (strings .NewReader ("some input" ))))
0 commit comments