github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/drivers/docker/fingerprint_test.go (about) 1 package docker 2 3 import ( 4 "context" 5 "testing" 6 7 "github.com/hashicorp/nomad/ci" 8 "github.com/hashicorp/nomad/client/testutil" 9 "github.com/hashicorp/nomad/helper/testlog" 10 "github.com/hashicorp/nomad/plugins/drivers" 11 "github.com/stretchr/testify/require" 12 ) 13 14 // TestDockerDriver_FingerprintHealth asserts that docker reports healthy 15 // whenever Docker is supported. 16 // 17 // In Linux CI and AppVeyor Windows environment, it should be enabled. 18 func TestDockerDriver_FingerprintHealth(t *testing.T) { 19 ci.Parallel(t) 20 testutil.DockerCompatible(t) 21 22 ctx, cancel := context.WithCancel(context.Background()) 23 defer cancel() 24 25 d := NewDockerDriver(ctx, testlog.HCLogger(t)).(*Driver) 26 27 fp := d.buildFingerprint() 28 require.Equal(t, drivers.HealthStateHealthy, fp.Health) 29 }