github.com/go-graphite/carbonapi@v0.17.0/cmd/mockbackend/testcases/render_error/render_error.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/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 49 # 503 50 - endpoint: "http://127.0.0.1:8081" 51 type: "GET" 52 URL: "/render/?target=d&format=json" 53 expectedResponse: 54 httpCode: 503 55 contentType: "text/plain; charset=utf-8" 56 57 # partial success 58 - endpoint: "http://127.0.0.1:8081" 59 type: "GET" 60 URL: "/render/?target=a&target=d&format=json" 61 expectedResponse: 62 httpCode: 200 63 contentType: "application/json" 64 expectedResults: 65 - metrics: 66 - target: "a" 67 datapoints: [[0,1],[1,2],[2,3],[2,4],[3,5]] 68 69 # partial success 70 - endpoint: "http://127.0.0.1:8081" 71 type: "GET" 72 URL: "/render/?target=divideSeries(a,d)&format=json" 73 expectedResponse: 74 httpCode: 200 75 contentType: "application/json" 76 expectedResults: 77 - metrics: 78 - target: "divideSeries(a,MISSING)" 79 datapoints: [[nan,1],[nan,2],[nan,3],[nan,4],[nan,5]] 80 81 listeners: 82 - address: ":9070" 83 expressions: 84 "a": 85 pathExpression: "a" 86 data: 87 - metricName: "a" 88 values: [0,1,2,2,3] 89 90 # timeout 91 "c": 92 pathExpression: "c" 93 code: 404 94 replyDelayMS: 7000 95 96 "d": 97 pathExpression: "d" 98 code: 503