github.com/go-graphite/carbonapi@v0.17.0/cmd/mockbackend/testcases/render_error_all/render_error_all.yaml (about) 1 version: "v1" 2 test: 3 apps: 4 - name: "carbonapi" 5 binary: "./carbonapi" 6 args: 7 - "-config" 8 - "./cmd/mockbackend/testcases/render_error_all/carbonapi.yaml" 9 - "-exact-config" 10 queries: 11 - endpoint: "http://127.0.0.1:8081" 12 type: "GET" 13 URL: "/render/?target=a&format=json" 14 expectedResponse: 15 httpCode: 200 16 contentType: "application/json" 17 expectedResults: 18 - metrics: 19 - target: "a" 20 datapoints: [[0,1],[1,2],[2,3],[2,4],[3,5]] 21 22 # empty 23 - endpoint: "http://127.0.0.1:8081" 24 type: "GET" 25 URL: "/render/?target=b&format=json" 26 expectedResponse: 27 httpCode: 200 28 contentType: "application/json" 29 30 - endpoint: "http://127.0.0.1:8081" 31 type: "GET" 32 URL: "/render/?target=a&target=b&format=json" 33 expectedResponse: 34 httpCode: 200 35 contentType: "application/json" 36 expectedResults: 37 - metrics: 38 - target: "a" 39 datapoints: [[0,1],[1,2],[2,3],[2,4],[3,5]] 40 41 # timeout 42 - endpoint: "http://127.0.0.1:8081" 43 type: "GET" 44 URL: "/render/?target=c&format=json" 45 expectedResponse: 46 httpCode: 503 47 contentType: "text/plain; charset=utf-8" 48 errBody: "c: timeout while fetching Response\n" 49 50 # 503 51 - endpoint: "http://127.0.0.1:8081" 52 type: "GET" 53 URL: "/render/?target=d&format=json" 54 expectedResponse: 55 httpCode: 503 56 contentType: "text/plain; charset=utf-8" 57 errBody: "d: Service Unavailable\n" 58 59 # partial success 60 - endpoint: "http://127.0.0.1:8081" 61 type: "GET" 62 URL: "/render/?target=a&target=d&format=json" 63 expectedResponse: 64 httpCode: 503 65 contentType: "text/plain; charset=utf-8" 66 errBody: "d: Service Unavailable\n" 67 68 # partial success, must fail, target d failed 69 - endpoint: "http://127.0.0.1:8081" 70 type: "GET" 71 URL: "/render/?target=divideSeries(a,d)&format=json" 72 expectedResponse: 73 httpCode: 503 74 contentType: "text/plain; charset=utf-8" 75 errBody: "divideSeries(a,d): Service Unavailable\n" 76 77 listeners: 78 - address: ":9070" 79 expressions: 80 "a": 81 pathExpression: "a" 82 data: 83 - metricName: "a" 84 values: [0,1,2,2,3] 85 86 # timeout 87 "c": 88 pathExpression: "c" 89 code: 404 90 replyDelayMS: 7000 91 92 "d": 93 pathExpression: "d" 94 code: 503