func testStorageUnlockNode(storage cluster.Storage, t *testing.T) { node := cluster.Node{Address: "addr-xyz"} defer storage.RemoveNode("addr-xyz") err := storage.StoreNode(node) assertIsNil(err, t) locked, err := storage.LockNodeForHealing("addr-xyz", true, 200*time.Millisecond) assertIsNil(err, t) err = storage.UnlockNode("addr-xyz") assertIsNil(err, t) locked, err = storage.LockNodeForHealing("addr-xyz", true, 200*time.Millisecond) assertIsNil(err, t) if !locked { t.Fatal("Expected LockNodeForHealing to return true after unlocking") } }