/dports/www/grafana8/grafana-8.3.6/pkg/middleware/ |
H A D | testing.go | 19 type scenarioContext struct { struct 42 func (sc *scenarioContext) withValidApiKey() *scenarioContext { argument 47 func (sc *scenarioContext) withTokenSessionCookie(unhashedToken string) *scenarioContext { argument 52 func (sc *scenarioContext) withAuthorizationHeader(authHeader string) *scenarioContext { argument 57 func (sc *scenarioContext) withJWTAuthHeader(jwtAuthHeader string) *scenarioContext { argument 62 func (sc *scenarioContext) fakeReq(method, url string) *scenarioContext { argument 73 func (sc *scenarioContext) fakeReqWithParams(method, url string, queryParams map[string]string) *sc… argument 91 func (sc *scenarioContext) exec() { argument 128 type scenarioFunc func(t *testing.T, c *scenarioContext)
|
H A D | quota_test.go | 18 middlewareScenario(t, "and global quota not reached", func(t *testing.T, sc *scenarioContext) { 35 middlewareScenario(t, "and global quota reached", func(t *testing.T, sc *scenarioContext) { 55 …lewareScenario(t, "and global session quota not reached", func(t *testing.T, sc *scenarioContext) { 75 …middlewareScenario(t, "and global session quota reached", func(t *testing.T, sc *scenarioContext) { 90 setUp := func(sc *scenarioContext) { 132 middlewareScenario(t, "global datasource quota reached", func(t *testing.T, sc *scenarioContext) { 145 middlewareScenario(t, "user Org quota not reached", func(t *testing.T, sc *scenarioContext) { 159 middlewareScenario(t, "user Org quota reached", func(t *testing.T, sc *scenarioContext) { 172 middlewareScenario(t, "org dashboard quota not reached", func(t *testing.T, sc *scenarioContext) { 185 middlewareScenario(t, "org dashboard quota reached", func(t *testing.T, sc *scenarioContext) { [all …]
|
H A D | auth_test.go | 17 …Scenario(t, "ReqSignIn true and unauthenticated request", func(t *testing.T, sc *scenarioContext) { 25 …ario(t, "ReqSignIn true and unauthenticated API request", func(t *testing.T, sc *scenarioContext) { 42 t *testing.T, sc *scenarioContext) { 55 t *testing.T, sc *scenarioContext) { 72 t *testing.T, sc *scenarioContext) { 84 t *testing.T, sc *scenarioContext) { 102 t *testing.T, sc *scenarioContext) { 111 t *testing.T, sc *scenarioContext) { 120 t *testing.T, sc *scenarioContext) {
|
H A D | middleware_test.go | 97 t *testing.T, sc *scenarioContext) { 105 t *testing.T, sc *scenarioContext) { 125 t *testing.T, sc *scenarioContext) { 131 t *testing.T, sc *scenarioContext) { 138 middlewareScenario(t, "Invalid api key", func(t *testing.T, sc *scenarioContext) { 147 middlewareScenario(t, "Valid API key", func(t *testing.T, sc *scenarioContext) { 180 middlewareScenario(t, "Valid API key, but expired", func(t *testing.T, sc *scenarioContext) { 201 t *testing.T, sc *scenarioContext) { 333 middlewareScenario(t, "When anonymous access is enabled", func(t *testing.T, sc *scenarioContext) { 389 …middlewareScenario(t, "Should respect auto signup option", func(t *testing.T, sc *scenarioContext)… [all …]
|
H A D | middleware_jwt_auth_test.go | 34 …middlewareScenario(t, "Valid token with valid login claim", func(t *testing.T, sc *scenarioContext… 61 …middlewareScenario(t, "Valid token with valid email claim", func(t *testing.T, sc *scenarioContext… 88 …middlewareScenario(t, "Valid token without a login claim", func(t *testing.T, sc *scenarioContext)… 101 …middlewareScenario(t, "Valid token without a email claim", func(t *testing.T, sc *scenarioContext)… 114 middlewareScenario(t, "Invalid token", func(t *testing.T, sc *scenarioContext) {
|
H A D | middleware_basic_auth_test.go | 26 middlewareScenario(t, "Valid API key", func(t *testing.T, sc *scenarioContext) { 45 middlewareScenario(t, "Handle auth", func(t *testing.T, sc *scenarioContext) { 77 middlewareScenario(t, "Auth sequence", func(t *testing.T, sc *scenarioContext) { 109 …reScenario(t, "Should return error if user is not found", func(t *testing.T, sc *scenarioContext) { 121 …t, "Should return error if user & password do not match", func(t *testing.T, sc *scenarioContext) {
|
/dports/www/grafana8/grafana-8.3.6/pkg/api/ |
H A D | dashboard_test.go | 154 "/api/dashboards/uid/:uid", role, func(sc *scenarioContext) { 167 "/api/dashboards/uid/:uid", role, func(sc *scenarioContext) { 201 "/api/dashboards/uid/:uid", role, func(sc *scenarioContext) { 213 "/api/dashboards/uid/:uid", role, func(sc *scenarioContext) { 310 "/api/dashboards/uid/:uid", role, func(sc *scenarioContext) { 1046 func callGetDashboard(sc *scenarioContext, hs *HTTPServer) { argument 1051 func callGetDashboardVersion(sc *scenarioContext) { argument 1061 func callGetDashboardVersions(sc *scenarioContext) { argument 1089 func callPostDashboard(sc *scenarioContext) { argument 1093 func callRestoreDashboardVersion(sc *scenarioContext) { argument [all …]
|
H A D | annotations_test.go | 40 cmd, func(sc *scenarioContext) { 46 role, updateCmd, func(sc *scenarioContext) { 52 "/api/annotations/:annotationId", role, patchCmd, func(sc *scenarioContext) { 58 "/api/annotations/:annotationId", role, func(sc *scenarioContext) { 72 cmd, func(sc *scenarioContext) { 88 "/api/annotations/:annotationId", role, func(sc *scenarioContext) { 150 …en calling POST on", "/api/annotations", "/api/annotations", role, cmd, func(sc *scenarioContext) { 169 "/api/annotations/:annotationId", role, func(sc *scenarioContext) { 183 …en calling POST on", "/api/annotations", "/api/annotations", role, cmd, func(sc *scenarioContext) { 202 "/api/annotations/:annotationId", role, func(sc *scenarioContext) { [all …]
|
H A D | common_test.go | 102 func (sc *scenarioContext) fakeReq(method, url string) *scenarioContext { 111 func (sc *scenarioContext) fakeReqWithParams(method, url string, queryParams map[string]string) *sc… 130 func (sc *scenarioContext) fakeReqNoAssertions(method, url string) *scenarioContext { 138 func (sc *scenarioContext) fakeReqNoAssertionsWithCookie(method, url string, cookie http.Cookie) *s… 150 type scenarioContext struct { struct 164 func (sc *scenarioContext) exec() { argument 168 type scenarioFunc func(c *scenarioContext) 192 func setupScenarioContext(t *testing.T, url string) *scenarioContext { 194 sc := &scenarioContext{ 220 …*setting.Cfg, url string, permissions []*accesscontrol.Permission) (*scenarioContext, *HTTPServer)…
|
H A D | folder_permission_test.go | 38 …/uid/permissions", "/api/folders/:uid/permissions", models.ROLE_EDITOR, func(sc *scenarioContext) { 54 fn: func(sc *scenarioContext) { 81 …/uid/permissions", "/api/folders/:uid/permissions", models.ROLE_EDITOR, func(sc *scenarioContext) { 97 fn: func(sc *scenarioContext) { 158 fn: func(sc *scenarioContext) { 210 fn: func(sc *scenarioContext) { 238 fn: func(sc *scenarioContext) { 284 fn: func(sc *scenarioContext) { 360 fn: func(sc *scenarioContext) { 379 func callGetFolderPermissions(sc *scenarioContext, hs *HTTPServer) { argument [all …]
|
H A D | dashboard_permission_test.go | 35 "/api/dashboards/id/:id/permissions", models.ROLE_EDITOR, func(sc *scenarioContext) { 52 fn: func(sc *scenarioContext) { 95 fn: func(sc *scenarioContext) { 155 fn: func(sc *scenarioContext) { 193 fn: func(sc *scenarioContext) { 234 fn: func(sc *scenarioContext) { 263 fn: func(sc *scenarioContext) { 305 fn: func(sc *scenarioContext) { 380 fn: func(sc *scenarioContext) { 402 func callGetDashboardPermissions(sc *scenarioContext, hs *HTTPServer) { argument [all …]
|
H A D | plugins_test.go | 59 func(sc *scenarioContext) { 84 func(sc *scenarioContext) { 107 func(sc *scenarioContext) { 133 func(sc *scenarioContext) { 154 func(sc *scenarioContext) { 178 func(sc *scenarioContext) { 188 func callGetPluginAsset(sc *scenarioContext) { argument
|
H A D | user_test.go | 30 loggedInUserScenario(t, "When calling GET on", "api/users/:id", func(sc *scenarioContext) { 83 loggedInUserScenario(t, "When calling GET on", "/api/users/lookup", func(sc *scenarioContext) { 129 loggedInUserScenario(t, "When calling GET on", "/api/users", func(sc *scenarioContext) { 153 …lling GET with page and limit querystring parameters on", "/api/users", func(sc *scenarioContext) { 173 loggedInUserScenario(t, "When calling GET on", "/api/users/search", func(sc *scenarioContext) { 199 … with page and perpage querystring parameters on", "/api/users/search", func(sc *scenarioContext) {
|
H A D | alerting_test.go | 56 models.ROLE_EDITOR, cmd, func(sc *scenarioContext) { 70 models.ROLE_EDITOR, cmd, func(sc *scenarioContext) { 84 models.ROLE_EDITOR, func(sc *scenarioContext) { 108 "/api/alerts", models.ROLE_EDITOR, func(sc *scenarioContext) { 145 "/alert-notifications/:notificationId", models.ROLE_ADMIN, func(sc *scenarioContext) { 154 func callPauseAlert(sc *scenarioContext) { argument
|
H A D | admin_users_test.go | 39 "/api/admin/users/:id/permissions", role, updateCmd, func(sc *scenarioContext) { 57 "/api/admin/users/1/logout", "/api/admin/users/:id/logout", func(sc *scenarioContext) { 70 "/api/admin/users/:id/logout", func(sc *scenarioContext) { 87 …/200/revoke-auth-token", "/api/admin/users/:id/revoke-auth-token", cmd, func(sc *scenarioContext) { 102 …"/api/admin/users/200/auth-tokens", "/api/admin/users/:id/auth-tokens", func(sc *scenarioContext) { 117 "/api/admin/users/42/enable", "/api/admin/users/:id/enable", func(sc *scenarioContext) { 143 "/api/admin/users/42/disable", "/api/admin/users/:id/disable", func(sc *scenarioContext) { 171 "/api/admin/users/42/disable", "/api/admin/users/:id/disable", func(sc *scenarioContext) { 189 "/api/admin/users/42/enable", "/api/admin/users/:id/enable", func(sc *scenarioContext) { 209 "/api/admin/users/:id", func(sc *scenarioContext) { [all …]
|
H A D | dashboard_snapshot_test.go | 72 …TE", "/api/snapshots/12345", "/api/snapshots/:key", models.ROLE_EDITOR, func(sc *scenarioContext) { 91 "/api/snapshots-delete/12345", "/api/snapshots-delete/:deleteKey", func(sc *scenarioContext) { 124 "/api/snapshots/12345", "/api/snapshots/:key", models.ROLE_EDITOR, func(sc *scenarioContext) { 151 …TE", "/api/snapshots/12345", "/api/snapshots/:key", models.ROLE_EDITOR, func(sc *scenarioContext) { 173 …TE", "/api/snapshots/12345", "/api/snapshots/:key", models.ROLE_EDITOR, func(sc *scenarioContext) { 198 "/api/snapshots/12345", "/api/snapshots/:key", models.ROLE_EDITOR, func(sc *scenarioContext) { 219 …TE", "/api/snapshots/12345", "/api/snapshots/:key", models.ROLE_EDITOR, func(sc *scenarioContext) { 235 …ET", "/api/snapshots/12345", "/api/snapshots/:key", models.ROLE_EDITOR, func(sc *scenarioContext) {
|
/dports/www/grafana8/grafana-8.3.6/pkg/services/auth/jwt/ |
H A D | auth_test.go | 26 type scenarioContext struct { struct 33 scenarioContext anonMember 38 type scenarioFunc func(*testing.T, scenarioContext) 47 scenario(t, "verifies a token", func(t *testing.T, sc scenarioContext) { 56 scenario(t, "rejects a token signed by unknown key", func(t *testing.T, sc scenarioContext) { 191 scenario(t, "validates iss field for equality", func(t *testing.T, sc scenarioContext) { 204 scenario(t, "validates sub field for equality", func(t *testing.T, sc scenarioContext) { 305 runner := scenarioRunner(func(t *testing.T, sc scenarioContext) { 338 runner := scenarioRunner(func(t *testing.T, sc scenarioContext) { 341 fn(t, cachingScenarioContext{scenarioContext: sc, reqCount: &reqCount}) [all …]
|
/dports/www/grafana8/grafana-8.3.6/pkg/services/libraryelements/ |
H A D | libraryelements_create_test.go | 15 func(t *testing.T, sc scenarioContext) { 22 func(t *testing.T, sc scenarioContext) { 64 func(t *testing.T, sc scenarioContext) { 110 func(t *testing.T, sc scenarioContext) { 118 func(t *testing.T, sc scenarioContext) { 126 func(t *testing.T, sc scenarioContext) { 134 func(t *testing.T, sc scenarioContext) {
|
H A D | libraryelements_patch_test.go | 16 func(t *testing.T, sc scenarioContext) { 24 func(t *testing.T, sc scenarioContext) { 86 func(t *testing.T, sc scenarioContext) { 108 func(t *testing.T, sc scenarioContext) { 130 func(t *testing.T, sc scenarioContext) { 152 func(t *testing.T, sc scenarioContext) { 165 func(t *testing.T, sc scenarioContext) { 178 func(t *testing.T, sc scenarioContext) { 195 func(t *testing.T, sc scenarioContext) { 223 func(t *testing.T, sc scenarioContext) { [all …]
|
H A D | libraryelements_delete_test.go | 16 func(t *testing.T, sc scenarioContext) { 22 func(t *testing.T, sc scenarioContext) { 35 func(t *testing.T, sc scenarioContext) { 44 func(t *testing.T, sc scenarioContext) {
|
H A D | libraryelements_permissions_test.go | 69 func(t *testing.T, sc scenarioContext) { 79 func(t *testing.T, sc scenarioContext) { 94 func(t *testing.T, sc scenarioContext) { 109 func(t *testing.T, sc scenarioContext) { 133 func(t *testing.T, sc scenarioContext) { 142 func(t *testing.T, sc scenarioContext) { 156 func(t *testing.T, sc scenarioContext) { 170 func(t *testing.T, sc scenarioContext) { 192 func(t *testing.T, sc scenarioContext) { 201 func(t *testing.T, sc scenarioContext) { [all …]
|
H A D | libraryelements_test.go | 29 func(t *testing.T, sc scenarioContext) { 69 func(t *testing.T, sc scenarioContext) { 75 func(t *testing.T, sc scenarioContext) { 170 type scenarioContext struct { struct 270 func scenarioWithPanel(t *testing.T, desc string, fn func(t *testing.T, sc scenarioContext)) { argument 273 testScenario(t, desc, func(t *testing.T, sc scenarioContext) { 284 func testScenario(t *testing.T, desc string, fn func(t *testing.T, sc scenarioContext)) { argument 318 sc := scenarioContext{
|
/dports/www/grafana8/grafana-8.3.6/pkg/services/alerting/ |
H A D | notifier_test.go | 37 evalCtx, true, func(sc *scenarioContext) { 48 evalCtx, true, func(sc *scenarioContext) { 60 evalCtx, false, func(sc *scenarioContext) { 70 evalCtx, true, func(sc *scenarioContext) { 100 evalCtx, true, func(sc *scenarioContext) { 130 evalCtxWithMatch, true, func(sc *scenarioContext) { 143 evalCtxWithoutMatch, true, func(sc *scenarioContext) { 156 type scenarioContext struct { struct 167 type scenarioFunc func(c *scenarioContext) 214 scenarioCtx := &scenarioContext{
|
/dports/www/grafana8/grafana-8.3.6/packages/grafana-e2e/src/support/ |
H A D | scenarioContext.ts | 15 const scenarioContext: ScenarioContext = { constant 42 getScenarioContext: (): ScenarioContext => ({ ...scenarioContext }), 55 scenarioContext[key] = value;
|
/dports/www/grafana8/grafana-8.3.6/pkg/services/librarypanels/ |
H A D | librarypanels_test.go | 27 func(t *testing.T, sc scenarioContext) { 124 func(t *testing.T, sc scenarioContext) { 337 func(t *testing.T, sc scenarioContext) { 376 func(t *testing.T, sc scenarioContext) { 450 func(t *testing.T, sc scenarioContext) { 524 func(t *testing.T, sc scenarioContext) { 687 func(t *testing.T, sc scenarioContext) { 727 func(t *testing.T, sc scenarioContext) { 769 func(t *testing.T, sc scenarioContext) { 1318 type scenarioContext struct { struct [all …]
|