| 1 | package zoo |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | |
| 6 | "github.com/mesos/mesos-go/api/v0/detector" |
| 7 | "github.com/stretchr/testify/assert" |
| 8 | ) |
| 9 | |
| 10 | // validate plugin registration for zk:// prefix is working |
| 11 | func TestDectorFactoryNew_ZkPrefix(t *testing.T) { |
| 12 | assert := assert.New(t) |
| 13 | m, err := detector.New("zk://127.0.0.1:5050/mesos") |
| 14 | assert.NoError(err) |
| 15 | assert.IsType(&MasterDetector{}, m) |
| 16 | md := m.(*MasterDetector) |
| 17 | t.Logf("canceling detector") |
| 18 | md.Cancel() |
| 19 | } |