Exemplo n.º 1
0
func TestBucketKeyWrongBucketNumberCausePanic_3(t *testing.T) {
	conf = newConfig(26, 3, fnvHash)
	defer testutil.AssertPanic(t, "A panic should occur when asking for a level beyond a valid range")
	newBucketKey(0, 2)
}
Exemplo n.º 2
0
func TestStateTxWrongCallCausePanic_2(t *testing.T) {
	_, state := createFreshDBAndConstructState(t)
	defer testutil.AssertPanic(t, "A panic should occur when a tx-begin is invoked before tx-finish for on-going tx")
	state.TxBegin("txUuid")
	state.TxBegin("anotherUuid")
}
Exemplo n.º 3
0
func TestStateTxWrongCallCausePanic_3(t *testing.T) {
	_, state := createFreshDBAndConstructState(t)
	defer testutil.AssertPanic(t, "A panic should occur when Uuid for tx-begin and tx-finish ends")
	state.TxBegin("txUuid")
	state.TxFinish("anotherUuid", true)
}
Exemplo n.º 4
0
func TestStateTxWrongCallCausePanic_1(t *testing.T) {
	_, state := createFreshDBAndConstructState(t)
	defer testutil.AssertPanic(t, "A panic should occur when a set state is invoked with out calling a tx-begin")
	state.Set("chaincodeID1", "key1", []byte("value1"))
}