mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Update server/etcdserver/txn/txn_test.go
Signed-off-by: Marcondes Viana <marju10@gmail.com> Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com>
This commit is contained in:
parent
4c63611768
commit
8fb839eac1
@ -159,7 +159,7 @@ func TestCheckTxnAuth(t *testing.T) {
|
||||
err error
|
||||
}{
|
||||
{
|
||||
name: "Unauthorize out of range compare",
|
||||
name: "Out of range compare is unathorized",
|
||||
txnRequest: &pb.TxnRequest{
|
||||
Compare: []*pb.Compare{
|
||||
{
|
||||
@ -171,7 +171,7 @@ func TestCheckTxnAuth(t *testing.T) {
|
||||
err: auth.ErrPermissionDenied,
|
||||
},
|
||||
{
|
||||
name: "No error for nil request range",
|
||||
name: "Nil request range is always authorized",
|
||||
txnRequest: &pb.TxnRequest{
|
||||
Success: []*pb.RequestOp{
|
||||
{
|
||||
@ -184,7 +184,7 @@ func TestCheckTxnAuth(t *testing.T) {
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "Authorize request range in range",
|
||||
name: "Range request in range is authorised",
|
||||
txnRequest: &pb.TxnRequest{
|
||||
Success: []*pb.RequestOp{
|
||||
{
|
||||
@ -200,7 +200,7 @@ func TestCheckTxnAuth(t *testing.T) {
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "Unauthorize request range out of range",
|
||||
name: "Range request out of range is unauthorized",
|
||||
txnRequest: &pb.TxnRequest{
|
||||
Success: []*pb.RequestOp{
|
||||
{
|
||||
@ -216,7 +216,7 @@ func TestCheckTxnAuth(t *testing.T) {
|
||||
err: auth.ErrPermissionDenied,
|
||||
},
|
||||
{
|
||||
name: "No error for nil request put",
|
||||
name: "Nil Put request is authorized",
|
||||
txnRequest: &pb.TxnRequest{
|
||||
Success: []*pb.RequestOp{
|
||||
{
|
||||
@ -229,7 +229,7 @@ func TestCheckTxnAuth(t *testing.T) {
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "Authorize request pur in range",
|
||||
name: "Put request in range in authorized",
|
||||
txnRequest: &pb.TxnRequest{
|
||||
Success: []*pb.RequestOp{
|
||||
{
|
||||
@ -244,7 +244,7 @@ func TestCheckTxnAuth(t *testing.T) {
|
||||
err: nil,
|
||||
},
|
||||
{
|
||||
name: "Unauthorized request pur in range",
|
||||
name: "Put request out of range is unauthorized",
|
||||
txnRequest: &pb.TxnRequest{
|
||||
Success: []*pb.RequestOp{
|
||||
{
|
||||
@ -259,7 +259,7 @@ func TestCheckTxnAuth(t *testing.T) {
|
||||
err: auth.ErrPermissionDenied,
|
||||
},
|
||||
{
|
||||
name: "No error for nil delete range",
|
||||
name: "Nil delete request is authorized",
|
||||
txnRequest: &pb.TxnRequest{
|
||||
Success: []*pb.RequestOp{
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user