mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
24 lines
394 B
Go
24 lines
394 B
Go
package client
|
|
|
|
import "testing"
|
|
|
|
func testClient(t *testing.T, cb func(c *Config)) *Client {
|
|
conf := DefaultConfig()
|
|
if cb != nil {
|
|
cb(conf)
|
|
}
|
|
|
|
client, err := NewClient(conf)
|
|
if err != nil {
|
|
t.Fatalf("err: %v", err)
|
|
}
|
|
return client
|
|
}
|
|
|
|
func TestClient_StartStop(t *testing.T) {
|
|
client := testClient(t, nil)
|
|
if err := client.Shutdown(); err != nil {
|
|
t.Fatalf("err: %v", err)
|
|
}
|
|
}
|