mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 02:28:09 +00:00 
			
		
		
		
	cleanup unused code and fix t.Fatal usage in goroutine in testing (#11694)
This commit is contained in:
		| @@ -404,13 +404,13 @@ func (c *OperatorRekeyCommand) provide(client *api.Client, key string) int { | ||||
| 	var started bool | ||||
| 	var nonce string | ||||
|  | ||||
| 	switch status.(type) { | ||||
| 	switch status := status.(type) { | ||||
| 	case *api.RekeyStatusResponse: | ||||
| 		stat := status.(*api.RekeyStatusResponse) | ||||
| 		stat := status | ||||
| 		started = stat.Started | ||||
| 		nonce = stat.Nonce | ||||
| 	case *api.RekeyVerificationStatusResponse: | ||||
| 		stat := status.(*api.RekeyVerificationStatusResponse) | ||||
| 		stat := status | ||||
| 		started = stat.Started | ||||
| 		nonce = stat.Nonce | ||||
| 	default: | ||||
| @@ -489,12 +489,12 @@ func (c *OperatorRekeyCommand) provide(client *api.Client, key string) int { | ||||
| 	var complete bool | ||||
| 	var mightContainUnsealKeys bool | ||||
|  | ||||
| 	switch resp.(type) { | ||||
| 	switch resp := resp.(type) { | ||||
| 	case *api.RekeyUpdateResponse: | ||||
| 		complete = resp.(*api.RekeyUpdateResponse).Complete | ||||
| 		complete = resp.Complete | ||||
| 		mightContainUnsealKeys = true | ||||
| 	case *api.RekeyVerificationUpdateResponse: | ||||
| 		complete = resp.(*api.RekeyVerificationUpdateResponse).Complete | ||||
| 		complete = resp.Complete | ||||
| 	default: | ||||
| 		c.UI.Error("Unknown update response type") | ||||
| 		return 1 | ||||
| @@ -608,9 +608,9 @@ func (c *OperatorRekeyCommand) printStatus(in interface{}) int { | ||||
| 	out := []string{} | ||||
| 	out = append(out, "Key | Value") | ||||
|  | ||||
| 	switch in.(type) { | ||||
| 	switch in := in.(type) { | ||||
| 	case *api.RekeyStatusResponse: | ||||
| 		status := in.(*api.RekeyStatusResponse) | ||||
| 		status := in | ||||
| 		out = append(out, fmt.Sprintf("Nonce | %s", status.Nonce)) | ||||
| 		out = append(out, fmt.Sprintf("Started | %t", status.Started)) | ||||
| 		if status.Started { | ||||
| @@ -631,7 +631,7 @@ func (c *OperatorRekeyCommand) printStatus(in interface{}) int { | ||||
| 			out = append(out, fmt.Sprintf("Backup | %t", status.Backup)) | ||||
| 		} | ||||
| 	case *api.RekeyVerificationStatusResponse: | ||||
| 		status := in.(*api.RekeyVerificationStatusResponse) | ||||
| 		status := in | ||||
| 		out = append(out, fmt.Sprintf("Started | %t", status.Started)) | ||||
| 		out = append(out, fmt.Sprintf("New Shares | %d", status.N)) | ||||
| 		out = append(out, fmt.Sprintf("New Threshold | %d", status.T)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Mayo
					Mayo