The session endpoint is no longer experimental since
01c9e7082eba71cbe60ce2e47acb9aad2c83c7ef, so we don't
need to start an experimental daemon.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit becd29c6651dffc253027e15f903ae7e7c918594)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -9,8 +9,8 @@ import ( |
| 9 | 9 |
"testing" |
| 10 | 10 |
|
| 11 | 11 |
"github.com/docker/docker/api/types" |
| 12 |
+ "github.com/docker/docker/api/types/versions" |
|
| 12 | 13 |
dclient "github.com/docker/docker/client" |
| 13 |
- "github.com/docker/docker/internal/test/daemon" |
|
| 14 | 14 |
"github.com/docker/docker/internal/test/fakecontext" |
| 15 | 15 |
"github.com/docker/docker/internal/test/request" |
| 16 | 16 |
"github.com/moby/buildkit/session" |
| ... | ... |
@@ -23,18 +23,9 @@ import ( |
| 23 | 23 |
|
| 24 | 24 |
func TestBuildWithSession(t *testing.T) {
|
| 25 | 25 |
skip.If(t, testEnv.DaemonInfo.OSType == "windows") |
| 26 |
+ skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.39"), "experimental in older versions") |
|
| 26 | 27 |
|
| 27 |
- var client dclient.APIClient |
|
| 28 |
- if !testEnv.DaemonInfo.ExperimentalBuild {
|
|
| 29 |
- skip.If(t, testEnv.IsRemoteDaemon, "cannot run daemon when remote daemon") |
|
| 30 |
- |
|
| 31 |
- d := daemon.New(t, daemon.WithExperimental) |
|
| 32 |
- d.StartWithBusybox(t) |
|
| 33 |
- defer d.Stop(t) |
|
| 34 |
- client = d.NewClientT(t) |
|
| 35 |
- } else {
|
|
| 36 |
- client = testEnv.APIClient() |
|
| 37 |
- } |
|
| 28 |
+ client := testEnv.APIClient() |
|
| 38 | 29 |
|
| 39 | 30 |
dockerfile := ` |
| 40 | 31 |
FROM busybox |
| ... | ... |
@@ -4,7 +4,7 @@ import ( |
| 4 | 4 |
"net/http" |
| 5 | 5 |
"testing" |
| 6 | 6 |
|
| 7 |
- "github.com/docker/docker/internal/test/daemon" |
|
| 7 |
+ "github.com/docker/docker/api/types/versions" |
|
| 8 | 8 |
req "github.com/docker/docker/internal/test/request" |
| 9 | 9 |
"gotest.tools/assert" |
| 10 | 10 |
is "gotest.tools/assert/cmp" |
| ... | ... |
@@ -13,17 +13,10 @@ import ( |
| 13 | 13 |
|
| 14 | 14 |
func TestSessionCreate(t *testing.T) {
|
| 15 | 15 |
skip.If(t, testEnv.OSType == "windows", "FIXME") |
| 16 |
+ skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.39"), "experimental in older versions") |
|
| 16 | 17 |
|
| 17 | 18 |
defer setupTest(t)() |
| 18 | 19 |
daemonHost := req.DaemonHost() |
| 19 |
- if !testEnv.DaemonInfo.ExperimentalBuild {
|
|
| 20 |
- skip.If(t, testEnv.IsRemoteDaemon, "cannot run daemon when remote daemon") |
|
| 21 |
- |
|
| 22 |
- d := daemon.New(t, daemon.WithExperimental) |
|
| 23 |
- d.StartWithBusybox(t) |
|
| 24 |
- defer d.Stop(t) |
|
| 25 |
- daemonHost = d.Sock() |
|
| 26 |
- } |
|
| 27 | 20 |
|
| 28 | 21 |
res, body, err := req.Post("/session",
|
| 29 | 22 |
req.Host(daemonHost), |
| ... | ... |
@@ -41,17 +34,10 @@ func TestSessionCreate(t *testing.T) {
|
| 41 | 41 |
|
| 42 | 42 |
func TestSessionCreateWithBadUpgrade(t *testing.T) {
|
| 43 | 43 |
skip.If(t, testEnv.OSType == "windows", "FIXME") |
| 44 |
+ skip.If(t, versions.LessThan(testEnv.DaemonAPIVersion(), "1.39"), "experimental in older versions") |
|
| 44 | 45 |
|
| 45 | 46 |
defer setupTest(t)() |
| 46 | 47 |
daemonHost := req.DaemonHost() |
| 47 |
- if !testEnv.DaemonInfo.ExperimentalBuild {
|
|
| 48 |
- skip.If(t, testEnv.IsRemoteDaemon, "cannot run daemon when remote daemon") |
|
| 49 |
- |
|
| 50 |
- d := daemon.New(t, daemon.WithExperimental) |
|
| 51 |
- d.StartWithBusybox(t) |
|
| 52 |
- defer d.Stop(t) |
|
| 53 |
- daemonHost = d.Sock() |
|
| 54 |
- } |
|
| 55 | 48 |
|
| 56 | 49 |
res, body, err := req.Post("/session", req.Host(daemonHost))
|
| 57 | 50 |
assert.NilError(t, err) |