Welcome to mirror list, hosted at ThFree Co, Russian Federation.

zbx_vc_get_value.yaml « zbxdbcache « libs « tests - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 67e89468558629408e62e831a1eece104afeb0c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
---
# TC0
# Test that single value from the end of second interval is returned
test case: Get last value from second interval
in:
  history:
  - itemid: 1
    value type: ITEM_VALUE_TYPE_STR
    data:
    - &row12
      value: value 1.2
      ts: 2017-01-10 10:00:01.200000000 +00:00
    - &row15
      value: value 1.5
      ts: 2017-01-10 10:00:01.500000000 +00:00
    - &row17
      value: value 1.7
      ts: 2017-01-10 10:00:01.700000000 +00:00
    - &row22
      value: value 2.2
      ts: 2017-01-10 10:00:02.200000000 +00:00
    - &row25
      value: value 2.5
      ts: 2017-01-10 10:00:02.500000000 +00:00
    - &row27
      value: value 2.7
      ts: 2017-01-10 10:00:02.700000000 +00:00
    - &row32
      value: value 3.2
      ts: 2017-01-10 10:00:03.200000000 +00:00
    - &row35
      value: value 3.5
      ts: 2017-01-10 10:00:03.500000000 +00:00
    - &row37
      value: value 3.7
      ts: 2017-01-10 10:00:03.700000000 +00:00
    - &row42
      value: value 4.2
      ts: 2017-01-10 10:00:04.200000000 +00:00
    - &row45
      value: value 4.5
      ts: 2017-01-10 10:00:04.500000000 +00:00
    - &row47
      value: value 4.7
      ts: 2017-01-10 10:00:04.700000000 +00:00
    - &row52
      value: value 5.2
      ts: 2017-01-10 10:00:05.200000000 +00:00
    - &row55
      value: value 5.5
      ts: 2017-01-10 10:00:05.500000000 +00:00
    - &row57
      value: value 5.7
      ts: 2017-01-10 10:00:05.700000000 +00:00
  precache:
  - time: 2017-01-10 10:10:00.000000000 +00:00
    itemid: 1
    value type: ITEM_VALUE_TYPE_STR
    seconds: 0
    count: 1
    end: 2017-01-10 10:00:04.999999999 +00:00
  test:
    time: 2017-01-10 10:10:00.000000000 +00:00
    itemid: 1
    value type: ITEM_VALUE_TYPE_STR
    end: 2017-01-10 10:00:04.999999999 +00:00
out:
  values:
  - *row47
  cache:
    items:
    - itemid: 1
      value type: ITEM_VALUE_TYPE_STR
      data:
      - *row42
      - *row45
      - *row47
      - *row52
      - *row55
      - *row57
      status:
      active_range: 597
      values_total: 6
      db_cached_from: 2017-01-10 10:00:04.000000000 +00:00
    mode: ZBX_VC_MODE_NORMAL
    hits: 1
    misses: 0
---
# TC1
# Test that single value from the middle of second interval is returned
test case: Get middle value from second interval
in:
  history:
  - itemid: 1
    value type: ITEM_VALUE_TYPE_STR
    data:
    - &row12
      value: value 1.2
      ts: 2017-01-10 10:00:01.200000000 +00:00
    - &row15
      value: value 1.5
      ts: 2017-01-10 10:00:01.500000000 +00:00
    - &row17
      value: value 1.7
      ts: 2017-01-10 10:00:01.700000000 +00:00
    - &row22
      value: value 2.2
      ts: 2017-01-10 10:00:02.200000000 +00:00
    - &row25
      value: value 2.5
      ts: 2017-01-10 10:00:02.500000000 +00:00
    - &row27
      value: value 2.7
      ts: 2017-01-10 10:00:02.700000000 +00:00
    - &row32
      value: value 3.2
      ts: 2017-01-10 10:00:03.200000000 +00:00
    - &row35
      value: value 3.5
      ts: 2017-01-10 10:00:03.500000000 +00:00
    - &row37
      value: value 3.7
      ts: 2017-01-10 10:00:03.700000000 +00:00
    - &row42
      value: value 4.2
      ts: 2017-01-10 10:00:04.200000000 +00:00
    - &row45
      value: value 4.5
      ts: 2017-01-10 10:00:04.500000000 +00:00
    - &row47
      value: value 4.7
      ts: 2017-01-10 10:00:04.700000000 +00:00
    - &row52
      value: value 5.2
      ts: 2017-01-10 10:00:05.200000000 +00:00
    - &row55
      value: value 5.5
      ts: 2017-01-10 10:00:05.500000000 +00:00
    - &row57
      value: value 5.7
      ts: 2017-01-10 10:00:05.700000000 +00:00
  precache:
  - time: 2017-01-10 10:10:00.000000000 +00:00
    itemid: 1
    value type: ITEM_VALUE_TYPE_STR
    seconds: 0
    count: 1
    end: 2017-01-10 10:00:04.999999999 +00:00
  test:
    time: 2017-01-10 10:10:00.000000000 +00:00
    itemid: 1
    value type: ITEM_VALUE_TYPE_STR
    end: 2017-01-10 10:00:04.500000000 +00:00
out:
  values:
  - *row45
  cache:
    items:
    - itemid: 1
      value type: ITEM_VALUE_TYPE_STR
      data:
      - *row42
      - *row45
      - *row47
      - *row52
      - *row55
      - *row57
      status:
      active_range: 597
      values_total: 6
      db_cached_from: 2017-01-10 10:00:04.000000000 +00:00
    mode: ZBX_VC_MODE_NORMAL
    hits: 1
    misses: 0
---
# TC1
# Test that single value from the beginning of second interval is returned
test case: Get first value from second interval
in:
  history:
  - itemid: 1
    value type: ITEM_VALUE_TYPE_STR
    data:
    - &row12
      value: value 1.2
      ts: 2017-01-10 10:00:01.200000000 +00:00
    - &row15
      value: value 1.5
      ts: 2017-01-10 10:00:01.500000000 +00:00
    - &row17
      value: value 1.7
      ts: 2017-01-10 10:00:01.700000000 +00:00
    - &row22
      value: value 2.2
      ts: 2017-01-10 10:00:02.200000000 +00:00
    - &row25
      value: value 2.5
      ts: 2017-01-10 10:00:02.500000000 +00:00
    - &row27
      value: value 2.7
      ts: 2017-01-10 10:00:02.700000000 +00:00
    - &row32
      value: value 3.2
      ts: 2017-01-10 10:00:03.200000000 +00:00
    - &row35
      value: value 3.5
      ts: 2017-01-10 10:00:03.500000000 +00:00
    - &row37
      value: value 3.7
      ts: 2017-01-10 10:00:03.700000000 +00:00
    - &row42
      value: value 4.2
      ts: 2017-01-10 10:00:04.200000000 +00:00
    - &row45
      value: value 4.5
      ts: 2017-01-10 10:00:04.500000000 +00:00
    - &row47
      value: value 4.7
      ts: 2017-01-10 10:00:04.700000000 +00:00
    - &row52
      value: value 5.2
      ts: 2017-01-10 10:00:05.200000000 +00:00
    - &row55
      value: value 5.5
      ts: 2017-01-10 10:00:05.500000000 +00:00
    - &row57
      value: value 5.7
      ts: 2017-01-10 10:00:05.700000000 +00:00
  precache:
  - time: 2017-01-10 10:10:00.000000000 +00:00
    itemid: 1
    value type: ITEM_VALUE_TYPE_STR
    seconds: 0
    count: 1
    end: 2017-01-10 10:00:04.999999999 +00:00
  test:
    time: 2017-01-10 10:10:00.000000000 +00:00
    itemid: 1
    value type: ITEM_VALUE_TYPE_STR
    end: 2017-01-10 10:00:04.400000000 +00:00
out:
  values:
  - *row42
  cache:
    items:
    - itemid: 1
      value type: ITEM_VALUE_TYPE_STR
      data:
      - *row42
      - *row45
      - *row47
      - *row52
      - *row55
      - *row57
      status:
      active_range: 597
      values_total: 6
      db_cached_from: 2017-01-10 10:00:04.000000000 +00:00
    mode: ZBX_VC_MODE_NORMAL
    hits: 1
    misses: 0
...