veyron2/verror: allow IDAction{} to be "".
Change-Id: I5142c42e5958b4f6d093290f8baffcb7a22ed9c0
diff --git a/runtimes/google/ipc/full_test.go b/runtimes/google/ipc/full_test.go
index eced2ae..572f007 100644
--- a/runtimes/google/ipc/full_test.go
+++ b/runtimes/google/ipc/full_test.go
@@ -326,9 +326,8 @@
fmt.Fprintf(os.Stderr, "got error msg: %q, expected: %q\n", err, pattern)
}
}
- // TODO(cnicolaou): Move this special case into verror.Is.
- if reflect.DeepEqual(id, verror.IDAction{}) {
- return err == nil
+ if err == nil && id.ID == "" {
+ return true
}
return verror.Is(err, id.ID)
}
@@ -431,15 +430,15 @@
err string
}{
// Client accepts talking to the server only if the server's blessings match the provided pattern
- {bServer, security.AllPrincipals, verror.Success, ""},
- {bServer, "root/server", verror.Success, ""},
+ {bServer, security.AllPrincipals, verror.IDAction{}, ""},
+ {bServer, "root/server", verror.IDAction{}, ""},
{bServer, "root/otherserver", verror.NotTrusted, nameErr},
{bServer, "otherroot/server", verror.NotTrusted, nameErr},
// and, if the server's blessing has third-party caveats then the server provides
// appropriate discharges.
- {bServerTPValid, security.AllPrincipals, verror.Success, ""},
- {bServerTPValid, "root/serverWithTPCaveats", verror.Success, ""},
+ {bServerTPValid, security.AllPrincipals, verror.IDAction{}, ""},
+ {bServerTPValid, "root/serverWithTPCaveats", verror.IDAction{}, ""},
{bServerTPValid, "root/otherserver", verror.NotTrusted, nameErr},
{bServerTPValid, "otherroot/server", verror.NotTrusted, nameErr},