Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: appengine/logdog/coordinator/endpoints/logs/list_test.go

Issue 1971493003: LogDog: Project READ access for user endpoints. (Closed) Base URL: https://github.com/luci/luci-go@logdog-project-service-config
Patch Set: Updated patchset dependency Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/logdog/coordinator/endpoints/logs/list_test.go
diff --git a/appengine/logdog/coordinator/endpoints/logs/list_test.go b/appengine/logdog/coordinator/endpoints/logs/list_test.go
index 33c1d18a286ee8ebf65ed64bc2897e6641f0410b..e3a8a94166acc9d0c1eeabdf86a87e7ad7081204 100644
--- a/appengine/logdog/coordinator/endpoints/logs/list_test.go
+++ b/appengine/logdog/coordinator/endpoints/logs/list_test.go
@@ -192,12 +192,18 @@ func TestList(t *testing.T) {
})
})
- Convey(`If the project does not exist, will return NotFound.`, func() {
+ Convey(`If the project does not exist, will return PermissionDenied.`, func() {
req.Project = "does-not-exist"
_, err := svc.List(c, &req)
- So(err, ShouldBeRPCNotFound)
+ So(err, ShouldBeRPCPermissionDenied)
})
+ Convey(`If the user can't access the project, will return PermissionDenied.`, func() {
+ req.Project = "proj-exclusive"
+
+ _, err := svc.List(c, &req)
+ So(err, ShouldBeRPCPermissionDenied)
+ })
})
}

Powered by Google App Engine
This is Rietveld 408576698