open-nomad/client/driver/testing.go
Chelsea Holland Komlo b321287712 extract test helper
lock concurrent accesses to node

comment exported method
2018-02-12 18:30:10 -05:00

14 lines
319 B
Go

package driver
import (
"testing"
)
// CheckForMockDriver is a test helper that ensures the mock driver is enabled.
// If not, it skips the current test.
func CheckForMockDriver(t *testing.T) {
if _, ok := BuiltinDrivers["mock_driver"]; !ok {
t.Skip(`test requires mock_driver; run with "-tags nomad_test"`)
}
}