mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-10-21 15:06:45 -04:00
cli: unify verify/recover endpoint flag
This commit is contained in:
parent
c9226de9ab
commit
3318126363
12 changed files with 114 additions and 61 deletions
|
@ -28,7 +28,7 @@ type stubProtoClient struct {
|
|||
cloudServiceAccountURI string
|
||||
}
|
||||
|
||||
func (c *stubProtoClient) Connect(_, _ string, _ []atls.Validator) error {
|
||||
func (c *stubProtoClient) Connect(_ string, _ []atls.Validator) error {
|
||||
c.conn = true
|
||||
return c.connectErr
|
||||
}
|
||||
|
@ -103,9 +103,9 @@ type fakeProtoClient struct {
|
|||
respClient proto.ActivationResponseClient
|
||||
}
|
||||
|
||||
func (c *fakeProtoClient) Connect(ip, port string, validators []atls.Validator) error {
|
||||
if ip == "" || port == "" {
|
||||
return errors.New("ip or port is empty")
|
||||
func (c *fakeProtoClient) Connect(endpoint string, validators []atls.Validator) error {
|
||||
if endpoint == "" {
|
||||
return errors.New("endpoint is empty")
|
||||
}
|
||||
if len(validators) == 0 {
|
||||
return errors.New("validators is empty")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue