mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 02:28:09 +00:00 
			
		
		
		
	Always use a local test server (#4207)
Some commands didn't setup a local test server since they didn't need it. Other commands didn't setup a local test server because Seth forgot. Long story short, I kept seeing weird requests to my Vault server when I ran tests, and that should never happen. This ensures all test requests will go to a test Vault instance. Benchmarks show this adds 0.4s to the command test suite.
This commit is contained in:
		 Seth Vargo
					Seth Vargo
				
			
				
					committed by
					
						 Jeff Mitchell
						Jeff Mitchell
					
				
			
			
				
	
			
			
			 Jeff Mitchell
						Jeff Mitchell
					
				
			
						parent
						
							5b4abc09dd
						
					
				
				
					commit
					e3de6c463c
				
			| @@ -44,7 +44,11 @@ func TestOperatorRotateCommand_Run(t *testing.T) { | ||||
| 			t.Run(tc.name, func(t *testing.T) { | ||||
| 				t.Parallel() | ||||
|  | ||||
| 				client, closer := testVaultServer(t) | ||||
| 				defer closer() | ||||
|  | ||||
| 				ui, cmd := testOperatorRotateCommand(t) | ||||
| 				cmd.client = client | ||||
|  | ||||
| 				code := cmd.Run(tc.args) | ||||
| 				if code != tc.code { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user