mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 02:28:09 +00:00 
			
		
		
		
	Update framework forwarding logic to handle nil system views (#8114)
This commit is contained in:
		| @@ -124,6 +124,7 @@ func TestBackendHandleRequest_Forwarding(t *testing.T) { | ||||
| 		isStandby    bool | ||||
| 		isSecondary  bool | ||||
| 		expectFwd    bool | ||||
| 		nilSysView   bool | ||||
| 	}{ | ||||
| 		"no forward": { | ||||
| 			expectFwd: false, | ||||
| @@ -159,6 +160,10 @@ func TestBackendHandleRequest_Forwarding(t *testing.T) { | ||||
| 			isSecondary: true, | ||||
| 			expectFwd:   false, | ||||
| 		}, | ||||
| 		"nil system view": { | ||||
| 			nilSysView: true, | ||||
| 			expectFwd:  false, | ||||
| 		}, | ||||
| 	} | ||||
|  | ||||
| 	for name, test := range tests { | ||||
| @@ -193,6 +198,10 @@ func TestBackendHandleRequest_Forwarding(t *testing.T) { | ||||
| 				}, | ||||
| 			} | ||||
|  | ||||
| 			if test.nilSysView { | ||||
| 				b.system = nil | ||||
| 			} | ||||
|  | ||||
| 			_, err := b.HandleRequest(context.Background(), &logical.Request{ | ||||
| 				Operation: logical.ReadOperation, | ||||
| 				Path:      "foo", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jim Kalafut
					Jim Kalafut