|
|
|
@ -102,14 +102,6 @@ func TestStateStore_Txn_KVS(t *testing.T) {
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
&structs.TxnOp{ |
|
|
|
|
KV: &structs.TxnKVOp{ |
|
|
|
|
Verb: structs.KVSGet, |
|
|
|
|
DirEnt: structs.DirEntry{ |
|
|
|
|
Key: "not/there", |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
&structs.TxnOp{ |
|
|
|
|
KV: &structs.TxnKVOp{ |
|
|
|
|
Verb: structs.KVSCheckIndex, |
|
|
|
@ -121,14 +113,6 @@ func TestStateStore_Txn_KVS(t *testing.T) {
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
&structs.TxnOp{ |
|
|
|
|
KV: &structs.TxnKVOp{ |
|
|
|
|
Verb: structs.KVSGet, |
|
|
|
|
DirEnt: structs.DirEntry{ |
|
|
|
|
Key: "foo/lock", |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
&structs.TxnOp{ |
|
|
|
|
KV: &structs.TxnKVOp{ |
|
|
|
|
Verb: structs.KVSLock, |
|
|
|
@ -227,7 +211,6 @@ func TestStateStore_Txn_KVS(t *testing.T) {
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
&structs.TxnResult{}, // get on not/there
|
|
|
|
|
&structs.TxnResult{ |
|
|
|
|
KV: &structs.DirEntry{ |
|
|
|
|
Key: "foo/update", |
|
|
|
@ -237,7 +220,6 @@ func TestStateStore_Txn_KVS(t *testing.T) {
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
&structs.TxnResult{}, // get on foo/lock before it's created
|
|
|
|
|
&structs.TxnResult{ |
|
|
|
|
KV: &structs.DirEntry{ |
|
|
|
|
Key: "foo/lock", |
|
|
|
@ -449,6 +431,14 @@ func TestStateStore_Txn_KVS_Rollback(t *testing.T) {
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
&structs.TxnOp{ |
|
|
|
|
KV: &structs.TxnKVOp{ |
|
|
|
|
Verb: structs.KVSGet, |
|
|
|
|
DirEnt: structs.DirEntry{ |
|
|
|
|
Key: "nope", |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
&structs.TxnOp{ |
|
|
|
|
KV: &structs.TxnKVOp{ |
|
|
|
|
Verb: structs.KVSCheckSession, |
|
|
|
@ -505,6 +495,7 @@ func TestStateStore_Txn_KVS_Rollback(t *testing.T) {
|
|
|
|
|
"lock isn't held, or is held by another session", |
|
|
|
|
"current session", |
|
|
|
|
`key "nope" doesn't exist`, |
|
|
|
|
`key "nope" doesn't exist`, |
|
|
|
|
"current modify index", |
|
|
|
|
`key "nope" doesn't exist`, |
|
|
|
|
"unknown KV verb", |
|
|
|
|