elastic: add more backend tests (#59312)

* elastic: added backend snapshot tests

* linter fixes
This commit is contained in:
Gábor Farkas
2022-11-28 14:59:57 +01:00
committed by GitHub
parent a7b2943dd1
commit f1dfaa784a
20 changed files with 1818 additions and 3 deletions
@@ -0,0 +1,391 @@
// 🌟 This was machine generated. Do not edit. 🌟
//
// Frame[0] {
// "custom": null
// }
// Name:
// Dimensions: 2 Fields by 3 Rows
// +-------------------------------+--------------------+
// | Name: time | Name: value |
// | Labels: | Labels: label=val3 |
// | Type: []time.Time | Type: []*float64 |
// +-------------------------------+--------------------+
// | 2022-11-22 12:45:00 +0000 UTC | 97.85990905761719 |
// | 2022-11-22 12:46:00 +0000 UTC | 98.39459228515625 |
// | 2022-11-22 12:47:00 +0000 UTC | 99.76652526855469 |
// +-------------------------------+--------------------+
//
//
//
// Frame[1] {
// "custom": null
// }
// Name:
// Dimensions: 2 Fields by 3 Rows
// +-------------------------------+--------------------+
// | Name: time | Name: value |
// | Labels: | Labels: label=val3 |
// | Type: []time.Time | Type: []*float64 |
// +-------------------------------+--------------------+
// | 2022-11-22 12:45:00 +0000 UTC | 8.375883102416992 |
// | 2022-11-22 12:46:00 +0000 UTC | 0.2577083110809326 |
// | 2022-11-22 12:47:00 +0000 UTC | 6.422464847564697 |
// +-------------------------------+--------------------+
//
//
//
// Frame[2] {
// "custom": null
// }
// Name:
// Dimensions: 2 Fields by 3 Rows
// +-------------------------------+--------------------+
// | Name: time | Name: value |
// | Labels: | Labels: label=val2 |
// | Type: []time.Time | Type: []*float64 |
// +-------------------------------+--------------------+
// | 2022-11-22 12:45:00 +0000 UTC | 87.77692413330078 |
// | 2022-11-22 12:46:00 +0000 UTC | 98.47160339355469 |
// | 2022-11-22 12:47:00 +0000 UTC | 92.53878784179688 |
// +-------------------------------+--------------------+
//
//
//
// Frame[3] {
// "custom": null
// }
// Name:
// Dimensions: 2 Fields by 3 Rows
// +-------------------------------+--------------------+
// | Name: time | Name: value |
// | Labels: | Labels: label=val2 |
// | Type: []time.Time | Type: []*float64 |
// +-------------------------------+--------------------+
// | 2022-11-22 12:45:00 +0000 UTC | 4.540984630584717 |
// | 2022-11-22 12:46:00 +0000 UTC | 3.343874216079712 |
// | 2022-11-22 12:47:00 +0000 UTC | 26.237546920776367 |
// +-------------------------------+--------------------+
//
//
//
// Frame[4] {
// "custom": null
// }
// Name:
// Dimensions: 2 Fields by 3 Rows
// +-------------------------------+--------------------+
// | Name: time | Name: value |
// | Labels: | Labels: label=val1 |
// | Type: []time.Time | Type: []*float64 |
// +-------------------------------+--------------------+
// | 2022-11-22 12:45:00 +0000 UTC | 98.57181549072266 |
// | 2022-11-22 12:46:00 +0000 UTC | 97.99356079101562 |
// | 2022-11-22 12:47:00 +0000 UTC | 94.45416259765625 |
// +-------------------------------+--------------------+
//
//
//
// Frame[5] {
// "custom": null
// }
// Name:
// Dimensions: 2 Fields by 3 Rows
// +-------------------------------+--------------------+
// | Name: time | Name: value |
// | Labels: | Labels: label=val1 |
// | Type: []time.Time | Type: []*float64 |
// +-------------------------------+--------------------+
// | 2022-11-22 12:45:00 +0000 UTC | 2.859630584716797 |
// | 2022-11-22 12:46:00 +0000 UTC | 0.4383751451969147 |
// | 2022-11-22 12:47:00 +0000 UTC | 1.4335381984710693 |
// +-------------------------------+--------------------+
//
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {
"meta": {
"custom": null
},
"fields": [
{
"name": "time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"displayNameFromDS": "val3 Max float"
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
},
"labels": {
"label": "val3"
},
"config": {
"displayNameFromDS": "val3 Max float"
}
}
]
},
"data": {
"values": [
[
1669121100000,
1669121160000,
1669121220000
],
[
97.85990905761719,
98.39459228515625,
99.76652526855469
]
]
}
},
{
"schema": {
"meta": {
"custom": null
},
"fields": [
{
"name": "time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"displayNameFromDS": "val3 Min float"
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
},
"labels": {
"label": "val3"
},
"config": {
"displayNameFromDS": "val3 Min float"
}
}
]
},
"data": {
"values": [
[
1669121100000,
1669121160000,
1669121220000
],
[
8.375883102416992,
0.2577083110809326,
6.422464847564697
]
]
}
},
{
"schema": {
"meta": {
"custom": null
},
"fields": [
{
"name": "time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"displayNameFromDS": "val2 Max float"
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
},
"labels": {
"label": "val2"
},
"config": {
"displayNameFromDS": "val2 Max float"
}
}
]
},
"data": {
"values": [
[
1669121100000,
1669121160000,
1669121220000
],
[
87.77692413330078,
98.47160339355469,
92.53878784179688
]
]
}
},
{
"schema": {
"meta": {
"custom": null
},
"fields": [
{
"name": "time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"displayNameFromDS": "val2 Min float"
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
},
"labels": {
"label": "val2"
},
"config": {
"displayNameFromDS": "val2 Min float"
}
}
]
},
"data": {
"values": [
[
1669121100000,
1669121160000,
1669121220000
],
[
4.540984630584717,
3.343874216079712,
26.237546920776367
]
]
}
},
{
"schema": {
"meta": {
"custom": null
},
"fields": [
{
"name": "time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"displayNameFromDS": "val1 Max float"
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
},
"labels": {
"label": "val1"
},
"config": {
"displayNameFromDS": "val1 Max float"
}
}
]
},
"data": {
"values": [
[
1669121100000,
1669121160000,
1669121220000
],
[
98.57181549072266,
97.99356079101562,
94.45416259765625
]
]
}
},
{
"schema": {
"meta": {
"custom": null
},
"fields": [
{
"name": "time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"displayNameFromDS": "val1 Min float"
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
},
"labels": {
"label": "val1"
},
"config": {
"displayNameFromDS": "val1 Min float"
}
}
]
},
"data": {
"values": [
[
1669121100000,
1669121160000,
1669121220000
],
[
2.859630584716797,
0.4383751451969147,
1.4335381984710693
]
]
}
}
]
}
@@ -0,0 +1,52 @@
[
{
"alias": "",
"bucketAggs": [
{
"field": "label",
"id": "4",
"settings": {
"min_doc_count": "1",
"order": "desc",
"orderBy": "_term",
"size": "10"
},
"type": "terms"
},
{
"field": "testtime",
"id": "2",
"settings": {
"interval": "1m",
"min_doc_count": "0",
"timeZone": "utc",
"trimEdges": "0"
},
"type": "date_histogram"
}
],
"datasource": {
"uid": "haha",
"type": "elasticsearch"
},
"datasourceId": 42,
"hide": true,
"metrics": [
{
"field": "float",
"id": "1",
"type": "max"
},
{
"field": "float",
"id": "3",
"type": "min"
}
],
"query": "",
"refId": "a",
"timeField": "testtime",
"intervalMs": 200,
"maxDataPoints": 779
}
]
@@ -0,0 +1,155 @@
{
"took": 4,
"responses": [
{
"took": 4,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 187,
"relation": "eq"
},
"max_score": null,
"hits": []
},
"aggregations": {
"4": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "val3",
"doc_count": 60,
"2": {
"buckets": [
{
"key_as_string": "1669121100000",
"key": 1669121100000,
"doc_count": 14,
"1": {
"value": 97.85990905761719
},
"3": {
"value": 8.375883102416992
}
},
{
"key_as_string": "1669121160000",
"key": 1669121160000,
"doc_count": 42,
"1": {
"value": 98.39459228515625
},
"3": {
"value": 0.2577083110809326
}
},
{
"key_as_string": "1669121220000",
"key": 1669121220000,
"doc_count": 4,
"1": {
"value": 99.76652526855469
},
"3": {
"value": 6.422464847564697
}
}
]
}
},
{
"key": "val2",
"doc_count": 68,
"2": {
"buckets": [
{
"key_as_string": "1669121100000",
"key": 1669121100000,
"doc_count": 14,
"1": {
"value": 87.77692413330078
},
"3": {
"value": 4.540984630584717
}
},
{
"key_as_string": "1669121160000",
"key": 1669121160000,
"doc_count": 45,
"1": {
"value": 98.47160339355469
},
"3": {
"value": 3.343874216079712
}
},
{
"key_as_string": "1669121220000",
"key": 1669121220000,
"doc_count": 9,
"1": {
"value": 92.53878784179688
},
"3": {
"value": 26.237546920776367
}
}
]
}
},
{
"key": "val1",
"doc_count": 59,
"2": {
"buckets": [
{
"key_as_string": "1669121100000",
"key": 1669121100000,
"doc_count": 18,
"1": {
"value": 98.57181549072266
},
"3": {
"value": 2.859630584716797
}
},
{
"key_as_string": "1669121160000",
"key": 1669121160000,
"doc_count": 32,
"1": {
"value": 97.99356079101562
},
"3": {
"value": 0.4383751451969147
}
},
{
"key_as_string": "1669121220000",
"key": 1669121220000,
"doc_count": 9,
"1": {
"value": 94.45416259765625
},
"3": {
"value": 1.4335381984710693
}
}
]
}
}
]
}
},
"status": 200
}
]
}
@@ -0,0 +1,69 @@
// 🌟 This was machine generated. Do not edit. 🌟
//
// Frame[0] {
// "custom": null
// }
// Name:
// Dimensions: 2 Fields by 3 Rows
// +-------------------------------+-------------------+
// | Name: time | Name: value |
// | Labels: | Labels: |
// | Type: []time.Time | Type: []*float64 |
// +-------------------------------+-------------------+
// | 2022-11-28 10:59:00 +0000 UTC | 97.96025848388672 |
// | 2022-11-28 11:00:00 +0000 UTC | 98.74357604980469 |
// | 2022-11-28 11:01:00 +0000 UTC | 99.94505310058594 |
// +-------------------------------+-------------------+
//
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {
"meta": {
"custom": null
},
"fields": [
{
"name": "time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"displayNameFromDS": "Max float"
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
},
"labels": {},
"config": {
"displayNameFromDS": "Max float"
}
}
]
},
"data": {
"values": [
[
1669633140000,
1669633200000,
1669633260000
],
[
97.96025848388672,
98.74357604980469,
99.94505310058594
]
]
}
}
]
}
@@ -0,0 +1,69 @@
// 🌟 This was machine generated. Do not edit. 🌟
//
// Frame[0] {
// "custom": null
// }
// Name:
// Dimensions: 2 Fields by 3 Rows
// +-------------------------------+---------------------+
// | Name: time | Name: value |
// | Labels: | Labels: |
// | Type: []time.Time | Type: []*float64 |
// +-------------------------------+---------------------+
// | 2022-11-28 10:59:00 +0000 UTC | 1.8121581077575684 |
// | 2022-11-28 11:00:00 +0000 UTC | 0.776007354259491 |
// | 2022-11-28 11:01:00 +0000 UTC | 0.26452451944351196 |
// +-------------------------------+---------------------+
//
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {
"meta": {
"custom": null
},
"fields": [
{
"name": "time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"displayNameFromDS": "Min float"
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
},
"labels": {},
"config": {
"displayNameFromDS": "Min float"
}
}
]
},
"data": {
"values": [
[
1669633140000,
1669633200000,
1669633260000
],
[
1.8121581077575684,
0.776007354259491,
0.26452451944351196
]
]
}
}
]
}
@@ -0,0 +1,41 @@
[
{
"refId": "a",
"datasource": { "uid": "haha", "type": "elasticsearch" },
"datasourceId": 42,
"query": "",
"alias": "",
"metrics": [{ "id": "1", "type": "max", "field": "float" }],
"bucketAggs": [
{
"type": "date_histogram",
"id": "2",
"settings": { "interval": "auto" },
"field": "testtime"
}
],
"timeField": "testtime",
"intervalMs": 30000,
"maxDataPoints": 814
},
{
"datasource": { "uid": "haha", "type": "elasticsearch" },
"datasourceId": 42,
"refId": "b",
"hide": false,
"query": "",
"alias": "",
"metrics": [{ "id": "1", "type": "min", "field": "float" }],
"bucketAggs": [
{
"type": "date_histogram",
"id": "2",
"settings": { "interval": "auto" },
"field": "testtime"
}
],
"timeField": "testtime",
"intervalMs": 30000,
"maxDataPoints": 814
}
]
@@ -0,0 +1,103 @@
{
"took": 5,
"responses": [
{
"took": 5,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 188,
"relation": "eq"
},
"max_score": null,
"hits": []
},
"aggregations": {
"2": {
"buckets": [
{
"key_as_string": "1669633140000",
"key": 1669633140000,
"doc_count": 34,
"1": {
"value": 97.96025848388672
}
},
{
"key_as_string": "1669633200000",
"key": 1669633200000,
"doc_count": 74,
"1": {
"value": 98.74357604980469
}
},
{
"key_as_string": "1669633260000",
"key": 1669633260000,
"doc_count": 80,
"1": {
"value": 99.94505310058594
}
}
]
}
},
"status": 200
},
{
"took": 4,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 188,
"relation": "eq"
},
"max_score": null,
"hits": []
},
"aggregations": {
"2": {
"buckets": [
{
"key_as_string": "1669633140000",
"key": 1669633140000,
"doc_count": 34,
"1": {
"value": 1.8121581077575684
}
},
{
"key_as_string": "1669633200000",
"key": 1669633200000,
"doc_count": 74,
"1": {
"value": 0.776007354259491
}
},
{
"key_as_string": "1669633260000",
"key": 1669633260000,
"doc_count": 80,
"1": {
"value": 0.26452451944351196
}
}
]
}
},
"status": 200
}
]
}
@@ -0,0 +1,208 @@
// 🌟 This was machine generated. Do not edit. 🌟
//
// Frame[0] {
// "custom": null
// }
// Name:
// Dimensions: 2 Fields by 4 Rows
// +-------------------------------+--------------------+
// | Name: time | Name: value |
// | Labels: | Labels: label=val3 |
// | Type: []time.Time | Type: []*float64 |
// +-------------------------------+--------------------+
// | 2022-11-14 10:40:00 +0000 UTC | 0 |
// | 2022-11-14 10:41:00 +0000 UTC | 27 |
// | 2022-11-14 10:42:00 +0000 UTC | 21 |
// | 2022-11-14 10:43:00 +0000 UTC | 31 |
// +-------------------------------+--------------------+
//
//
//
// Frame[1] {
// "custom": null
// }
// Name:
// Dimensions: 2 Fields by 4 Rows
// +-------------------------------+--------------------+
// | Name: time | Name: value |
// | Labels: | Labels: label=val2 |
// | Type: []time.Time | Type: []*float64 |
// +-------------------------------+--------------------+
// | 2022-11-14 10:40:00 +0000 UTC | 0 |
// | 2022-11-14 10:41:00 +0000 UTC | 28 |
// | 2022-11-14 10:42:00 +0000 UTC | 22 |
// | 2022-11-14 10:43:00 +0000 UTC | 39 |
// +-------------------------------+--------------------+
//
//
//
// Frame[2] {
// "custom": null
// }
// Name:
// Dimensions: 2 Fields by 4 Rows
// +-------------------------------+--------------------+
// | Name: time | Name: value |
// | Labels: | Labels: label=val1 |
// | Type: []time.Time | Type: []*float64 |
// +-------------------------------+--------------------+
// | 2022-11-14 10:40:00 +0000 UTC | 0 |
// | 2022-11-14 10:41:00 +0000 UTC | 26 |
// | 2022-11-14 10:42:00 +0000 UTC | 20 |
// | 2022-11-14 10:43:00 +0000 UTC | 41 |
// +-------------------------------+--------------------+
//
//
// 🌟 This was machine generated. Do not edit. 🌟
{
"status": 200,
"frames": [
{
"schema": {
"meta": {
"custom": null
},
"fields": [
{
"name": "time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"displayNameFromDS": "val3"
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
},
"labels": {
"label": "val3"
},
"config": {
"displayNameFromDS": "val3"
}
}
]
},
"data": {
"values": [
[
1668422400000,
1668422460000,
1668422520000,
1668422580000
],
[
0,
27,
21,
31
]
]
}
},
{
"schema": {
"meta": {
"custom": null
},
"fields": [
{
"name": "time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"displayNameFromDS": "val2"
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
},
"labels": {
"label": "val2"
},
"config": {
"displayNameFromDS": "val2"
}
}
]
},
"data": {
"values": [
[
1668422400000,
1668422460000,
1668422520000,
1668422580000
],
[
0,
28,
22,
39
]
]
}
},
{
"schema": {
"meta": {
"custom": null
},
"fields": [
{
"name": "time",
"type": "time",
"typeInfo": {
"frame": "time.Time"
},
"config": {
"displayNameFromDS": "val1"
}
},
{
"name": "value",
"type": "number",
"typeInfo": {
"frame": "float64",
"nullable": true
},
"labels": {
"label": "val1"
},
"config": {
"displayNameFromDS": "val1"
}
}
]
},
"data": {
"values": [
[
1668422400000,
1668422460000,
1668422520000,
1668422580000
],
[
0,
26,
20,
41
]
]
}
}
]
}
@@ -0,0 +1,45 @@
[
{
"alias": "",
"bucketAggs": [
{
"field": "label",
"id": "3",
"settings": {
"min_doc_count": "1",
"order": "desc",
"orderBy": "_term",
"size": "10"
},
"type": "terms"
},
{
"field": "testtime",
"id": "2",
"settings": {
"interval": "1m"
},
"type": "date_histogram"
}
],
"datasource": {
"type": "elasticsearch",
"uid": "haha"
},
"datasourceId": 42,
"expression": "",
"hide": true,
"intervalMs": 200,
"maxDataPoints": 1248,
"metrics": [
{
"id": "1",
"type": "count"
}
],
"query": "",
"refId": "a",
"timeField": "testtime",
"window": ""
}
]
@@ -0,0 +1,56 @@
{
"took": 7,
"responses": [
{
"took": 7,
"timed_out": false,
"_shards": { "total": 1, "successful": 1, "skipped": 0, "failed": 0 },
"hits": { "total": { "value": 255, "relation": "eq" }, "max_score": null, "hits": [] },
"aggregations": {
"3": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": [
{
"key": "val3",
"doc_count": 79,
"2": {
"buckets": [
{ "key_as_string": "1668422400000", "key": 1668422400000, "doc_count": 0 },
{ "key_as_string": "1668422460000", "key": 1668422460000, "doc_count": 27 },
{ "key_as_string": "1668422520000", "key": 1668422520000, "doc_count": 21 },
{ "key_as_string": "1668422580000", "key": 1668422580000, "doc_count": 31 }
]
}
},
{
"key": "val2",
"doc_count": 89,
"2": {
"buckets": [
{ "key_as_string": "1668422400000", "key": 1668422400000, "doc_count": 0 },
{ "key_as_string": "1668422460000", "key": 1668422460000, "doc_count": 28 },
{ "key_as_string": "1668422520000", "key": 1668422520000, "doc_count": 22 },
{ "key_as_string": "1668422580000", "key": 1668422580000, "doc_count": 39 }
]
}
},
{
"key": "val1",
"doc_count": 87,
"2": {
"buckets": [
{ "key_as_string": "1668422400000", "key": 1668422400000, "doc_count": 0 },
{ "key_as_string": "1668422460000", "key": 1668422460000, "doc_count": 26 },
{ "key_as_string": "1668422520000", "key": 1668422520000, "doc_count": 20 },
{ "key_as_string": "1668422580000", "key": 1668422580000, "doc_count": 41 }
]
}
}
]
}
},
"status": 200
}
]
}