mirror of https://github.com/docker/docs.git
add a few tests
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
ab4ca301ab
commit
d1d8bd5356
|
@ -20,6 +20,7 @@ var (
|
|||
ExecutionDriver: "execution-driver-test",
|
||||
KernelVersion: "1.2.3",
|
||||
OperatingSystem: "golang",
|
||||
Labels: []string{"foo=bar"},
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -60,6 +61,7 @@ func TestNodeSpecs(t *testing.T) {
|
|||
|
||||
assert.NoError(t, node.connectClient(client))
|
||||
assert.True(t, node.IsConnected())
|
||||
assert.True(t, node.IsHealthy())
|
||||
|
||||
assert.Equal(t, node.Cpus, mockInfo.NCPU)
|
||||
assert.Equal(t, node.Memory, mockInfo.MemTotal)
|
||||
|
@ -67,6 +69,7 @@ func TestNodeSpecs(t *testing.T) {
|
|||
assert.Equal(t, node.Labels["executiondriver"], mockInfo.ExecutionDriver)
|
||||
assert.Equal(t, node.Labels["kernelversion"], mockInfo.KernelVersion)
|
||||
assert.Equal(t, node.Labels["operatingsystem"], mockInfo.OperatingSystem)
|
||||
assert.Equal(t, node.Labels["foo"], "bar")
|
||||
|
||||
client.Mock.AssertExpectations(t)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue