mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-03 20:17:59 +00:00 
			
		
		
		
	Fix tests
This commit is contained in:
		@@ -82,7 +82,7 @@ func TestGenerateRoot_status(t *testing.T) {
 | 
				
			|||||||
		t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())
 | 
							t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if !strings.Contains(string(ui.OutputWriter.Bytes()), "Started: true") {
 | 
						if !strings.Contains(ui.OutputWriter.String(), "Started: true") {
 | 
				
			||||||
		t.Fatalf("bad: %s", ui.OutputWriter.String())
 | 
							t.Fatalf("bad: %s", ui.OutputWriter.String())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -182,7 +182,7 @@ func TestRekey_status(t *testing.T) {
 | 
				
			|||||||
		t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())
 | 
							t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if !strings.Contains(string(ui.OutputWriter.Bytes()), "Started: true") {
 | 
						if !strings.Contains(ui.OutputWriter.String(), "Started: true") {
 | 
				
			||||||
		t.Fatalf("bad: %s", ui.OutputWriter.String())
 | 
							t.Fatalf("bad: %s", ui.OutputWriter.String())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -243,8 +243,8 @@ func TestWrite_Output(t *testing.T) {
 | 
				
			|||||||
	if code := c.Run(args); code != 0 {
 | 
						if code := c.Run(args); code != 0 {
 | 
				
			||||||
		t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())
 | 
							t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if !strings.Contains(string(ui.OutputWriter.Bytes()), "Key") {
 | 
						if !strings.Contains(ui.OutputWriter.String(), "Key") {
 | 
				
			||||||
		t.Fatalf("bad: %s", string(ui.OutputWriter.Bytes()))
 | 
							t.Fatalf("bad: %s", ui.OutputWriter.String())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1418,11 +1418,6 @@ func (c *Core) runStandby(doneCh, stopCh, manualStepDownCh chan struct{}) {
 | 
				
			|||||||
		default:
 | 
							default:
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// Clear forwarding clients
 | 
					 | 
				
			||||||
		c.requestForwardingConnectionLock.Lock()
 | 
					 | 
				
			||||||
		c.clearForwardingClients()
 | 
					 | 
				
			||||||
		c.requestForwardingConnectionLock.Unlock()
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		// Create a lock
 | 
							// Create a lock
 | 
				
			||||||
		uuid, err := uuid.GenerateUUID()
 | 
							uuid, err := uuid.GenerateUUID()
 | 
				
			||||||
		if err != nil {
 | 
							if err != nil {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user