func commonTestStateDriverInitInvalidConfig(t *testing.T, d core.StateDriver) {
	config := &core.Config{}
	err := d.Init(config)
	if err == nil {
		t.Fatalf("d init succeeded, should have failed.")
	}

	err = d.Init(nil)
	if err == nil {
		t.Fatalf("d init succeeded, should have failed.")
	}
}
示例#2
0
func commonTestStateDriverInitInvalidConfig(t *testing.T, d core.StateDriver) {
	instInfo := core.InstanceInfo{DbURL: "xyz://127.0.0.1:2379"}
	err := d.Init(&instInfo)
	if err == nil {
		t.Fatalf("d init succeeded, should have failed.")
	}

	err = d.Init(nil)
	if err == nil {
		t.Fatalf("d init succeeded, should have failed.")
	}
}