moby/integration/system/version_test.go
Sebastiaan van Stijn 0de62d9bbc
Integration: use testenv.APIClient()
A client is already created in testenv.New(), so we can just
as well use that one, instead of creating a new client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-03 11:53:41 +01:00

23 lines
606 B
Go

package system // import "github.com/docker/docker/integration/system"
import (
"context"
"testing"
"gotest.tools/assert"
is "gotest.tools/assert/cmp"
)
func TestVersion(t *testing.T) {
defer setupTest(t)()
client := testEnv.APIClient()
version, err := client.ServerVersion(context.Background())
assert.NilError(t, err)
assert.Check(t, version.APIVersion != "")
assert.Check(t, version.Version != "")
assert.Check(t, version.MinAPIVersion != "")
assert.Check(t, is.Equal(testEnv.DaemonInfo.ExperimentalBuild, version.Experimental))
assert.Check(t, is.Equal(testEnv.OSType, version.Os))
}