2018-02-05 16:05:59 -05:00
|
|
|
package system // import "github.com/docker/docker/integration/system"
|
2017-09-14 17:50:52 -04:00
|
|
|
|
|
|
|
import (
|
2018-04-19 18:30:59 -04:00
|
|
|
"context"
|
2017-09-14 17:50:52 -04:00
|
|
|
"testing"
|
|
|
|
|
2020-02-07 08:39:24 -05:00
|
|
|
"gotest.tools/v3/assert"
|
|
|
|
is "gotest.tools/v3/assert/cmp"
|
2017-09-14 17:50:52 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestVersion(t *testing.T) {
|
2019-01-02 08:16:25 -05:00
|
|
|
defer setupTest(t)()
|
|
|
|
client := testEnv.APIClient()
|
2017-09-14 17:50:52 -04:00
|
|
|
|
|
|
|
version, err := client.ServerVersion(context.Background())
|
2018-03-13 15:28:34 -04:00
|
|
|
assert.NilError(t, err)
|
2017-09-14 17:50:52 -04:00
|
|
|
|
2017-12-22 16:30:49 -05:00
|
|
|
assert.Check(t, version.APIVersion != "")
|
|
|
|
assert.Check(t, version.Version != "")
|
|
|
|
assert.Check(t, version.MinAPIVersion != "")
|
2018-03-13 15:28:34 -04:00
|
|
|
assert.Check(t, is.Equal(testEnv.DaemonInfo.ExperimentalBuild, version.Experimental))
|
|
|
|
assert.Check(t, is.Equal(testEnv.OSType, version.Os))
|
2017-09-14 17:50:52 -04:00
|
|
|
}
|