2017-09-14 17:50:52 -04:00
|
|
|
package system
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2017-09-25 08:08:03 -04:00
|
|
|
"github.com/docker/docker/integration/util/request"
|
2017-09-14 17:50:52 -04:00
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"golang.org/x/net/context"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestVersion(t *testing.T) {
|
2017-09-25 08:08:03 -04:00
|
|
|
client := request.NewAPIClient(t)
|
2017-09-14 17:50:52 -04:00
|
|
|
|
|
|
|
version, err := client.ServerVersion(context.Background())
|
|
|
|
require.NoError(t, err)
|
|
|
|
|
|
|
|
assert.NotNil(t, version.APIVersion)
|
|
|
|
assert.NotNil(t, version.Version)
|
|
|
|
assert.NotNil(t, version.MinAPIVersion)
|
|
|
|
assert.Equal(t, testEnv.DaemonInfo.ExperimentalBuild, version.Experimental)
|
2017-09-20 08:47:49 -04:00
|
|
|
assert.Equal(t, testEnv.OSType, version.Os)
|
2017-09-14 17:50:52 -04:00
|
|
|
}
|