@@ -16,8 +16,8 @@ type PrepareInterface interface {
16
16
CreateStorage () (pool.StorageInterface , func ())
17
17
}
18
18
19
- // testStorage_Add проверка корректости добавления ноды в хранилище
20
- func testStorage_Add (t * testing.T , p PrepareInterface ) {
19
+ // TestStorage_Add проверка корректости добавления ноды в хранилище
20
+ func TestStorage_Add (t * testing.T , p PrepareInterface ) {
21
21
t .Parallel ()
22
22
23
23
storage , deferFunc := p .CreateStorage ()
@@ -50,8 +50,8 @@ func testStorage_Add(t *testing.T, p PrepareInterface) {
50
50
//assert.Equal(t, expectedNode.CapabilitiesList, nodeList[0].CapabilitiesList) //todo: доделать
51
51
}
52
52
53
- // testStorage_Add_Repeat проверка того что при повторном добавлении ноды вместо дублирования происходит корректный апдейт
54
- func testStorage_Add_Repeat (t * testing.T , p PrepareInterface ) {
53
+ // TestStorage_Add_Repeat проверка того что при повторном добавлении ноды вместо дублирования происходит корректный апдейт
54
+ func TestStorage_Add_Repeat (t * testing.T , p PrepareInterface ) {
55
55
t .Parallel ()
56
56
storage , deferFunc := p .CreateStorage ()
57
57
defer deferFunc ()
@@ -72,8 +72,8 @@ func testStorage_Add_Repeat(t *testing.T, p PrepareInterface) {
72
72
//todo: доделать capabilities
73
73
}
74
74
75
- // testStorage_Add_Limit_Overflow проверка того что при переполнении лимита, запись не добавляется в хранилище
76
- func testStorage_Add_Limit_Overflow (t * testing.T , p PrepareInterface ) {
75
+ // TestStorage_Add_Limit_Overflow проверка того что при переполнении лимита, запись не добавляется в хранилище
76
+ func TestStorage_Add_Limit_Overflow (t * testing.T , p PrepareInterface ) {
77
77
t .Parallel ()
78
78
storage , deferFunc := p .CreateStorage ()
79
79
defer deferFunc ()
@@ -94,8 +94,8 @@ func testStorage_Add_Limit_Overflow(t *testing.T, p PrepareInterface) {
94
94
assert .Len (t , nodeList , limit , "Added more than " + strconv .Itoa (limit )+ "one node" )
95
95
}
96
96
97
- // testStorage_GetAll проверка получения всех нод
98
- func testStorage_GetAll (t * testing.T , p PrepareInterface ) {
97
+ // TestStorage_GetAll проверка получения всех нод
98
+ func TestStorage_GetAll (t * testing.T , p PrepareInterface ) {
99
99
t .Parallel ()
100
100
storage , deferFunc := p .CreateStorage ()
101
101
defer deferFunc ()
@@ -134,8 +134,8 @@ func testStorage_GetAll(t *testing.T, p PrepareInterface) {
134
134
}
135
135
}
136
136
137
- // testStorage_GetByAddress проверка получения ноды по адресу
138
- func testStorage_GetByAddress (t * testing.T , p PrepareInterface ) {
137
+ // TestStorage_GetByAddress проверка получения ноды по адресу
138
+ func TestStorage_GetByAddress (t * testing.T , p PrepareInterface ) {
139
139
t .Parallel ()
140
140
storage , deferFunc := p .CreateStorage ()
141
141
defer deferFunc ()
@@ -155,8 +155,8 @@ func testStorage_GetByAddress(t *testing.T, p PrepareInterface) {
155
155
156
156
}
157
157
158
- // testStorage_GetBySession проверка получения ноды по sessionId
159
- func testStorage_GetBySession (t * testing.T , p PrepareInterface ) {
158
+ // TestStorage_GetBySession проверка получения ноды по sessionId
159
+ func TestStorage_GetBySession (t * testing.T , p PrepareInterface ) {
160
160
t .Parallel ()
161
161
storage , deferFunc := p .CreateStorage ()
162
162
defer deferFunc ()
@@ -177,8 +177,8 @@ func testStorage_GetBySession(t *testing.T, p PrepareInterface) {
177
177
178
178
}
179
179
180
- // testStorage_GetCountWithStatus проверка получения колличества нод с определенным статусом
181
- func testStorage_GetCountWithStatus (t * testing.T , p PrepareInterface ) {
180
+ // TestStorage_GetCountWithStatus проверка получения колличества нод с определенным статусом
181
+ func TestStorage_GetCountWithStatus (t * testing.T , p PrepareInterface ) {
182
182
t .Parallel ()
183
183
storage , deferFunc := p .CreateStorage ()
184
184
defer deferFunc ()
@@ -200,8 +200,8 @@ func testStorage_GetCountWithStatus(t *testing.T, p PrepareInterface) {
200
200
assert .Equal (t , count , 1 )
201
201
}
202
202
203
- // testStorage_Remove проверка удаления ноды
204
- func testStorage_Remove (t * testing.T , p PrepareInterface ) {
203
+ // TestStorage_Remove проверка удаления ноды
204
+ func TestStorage_Remove (t * testing.T , p PrepareInterface ) {
205
205
t .Parallel ()
206
206
storage , deferFunc := p .CreateStorage ()
207
207
defer deferFunc ()
@@ -216,8 +216,8 @@ func testStorage_Remove(t *testing.T, p PrepareInterface) {
216
216
assert .Error (t , err )
217
217
}
218
218
219
- // testStorage_ReserveAvailable_Positive проверка резервирования ноды
220
- func testStorage_ReserveAvailable_Positive (t * testing.T , p PrepareInterface ) {
219
+ // TestStorage_ReserveAvailable_Positive проверка резервирования ноды
220
+ func TestStorage_ReserveAvailable_Positive (t * testing.T , p PrepareInterface ) {
221
221
t .Parallel ()
222
222
storage , deferFunc := p .CreateStorage ()
223
223
defer deferFunc ()
@@ -242,8 +242,8 @@ func testStorage_ReserveAvailable_Positive(t *testing.T, p PrepareInterface) {
242
242
assert .Equal (t , pool .NodeStatusReserved , node .Status , "Node not Reserved" )
243
243
}
244
244
245
- // testStorage_ReserveAvailable_Negative проверка резервирования ноды, при условии отсутствия доступных нод
246
- func testStorage_ReserveAvailable_Negative (t * testing.T , p PrepareInterface ) {
245
+ // TestStorage_ReserveAvailable_Negative проверка резервирования ноды, при условии отсутствия доступных нод
246
+ func TestStorage_ReserveAvailable_Negative (t * testing.T , p PrepareInterface ) {
247
247
t .Parallel ()
248
248
storage , deferFunc := p .CreateStorage ()
249
249
defer deferFunc ()
@@ -256,8 +256,8 @@ func testStorage_ReserveAvailable_Negative(t *testing.T, p PrepareInterface) {
256
256
assert .Error (t , err )
257
257
}
258
258
259
- // testStorage_SetAvailable проверка изменения статуса ноды на Available
260
- func testStorage_SetAvailable (t * testing.T , p PrepareInterface ) {
259
+ // TestStorage_SetAvailable проверка изменения статуса ноды на Available
260
+ func TestStorage_SetAvailable (t * testing.T , p PrepareInterface ) {
261
261
t .Parallel ()
262
262
storage , deferFunc := p .CreateStorage ()
263
263
defer deferFunc ()
@@ -275,8 +275,8 @@ func testStorage_SetAvailable(t *testing.T, p PrepareInterface) {
275
275
assert .Equal (t , pool .NodeStatusAvailable , node .Status , "Node not Available" )
276
276
}
277
277
278
- // testStorage_SetBusy проверка изменения статуса ноды на Busy
279
- func testStorage_SetBusy (t * testing.T , p PrepareInterface ) {
278
+ // TestStorage_SetBusy проверка изменения статуса ноды на Busy
279
+ func TestStorage_SetBusy (t * testing.T , p PrepareInterface ) {
280
280
t .Parallel ()
281
281
storage , deferFunc := p .CreateStorage ()
282
282
defer deferFunc ()
@@ -296,8 +296,8 @@ func testStorage_SetBusy(t *testing.T, p PrepareInterface) {
296
296
assert .Equal (t , expectedSessionID , node .SessionID , "Not saved sessionID" )
297
297
}
298
298
299
- // testStorage_UpdateAdderss_UpdatesValue успешное обновления адреса ноды
300
- func testStorage_UpdateAdderss_UpdatesValue (t * testing.T , p PrepareInterface ) {
299
+ // TestStorage_UpdateAdderss_UpdatesValue успешное обновления адреса ноды
300
+ func TestStorage_UpdateAdderss_UpdatesValue (t * testing.T , p PrepareInterface ) {
301
301
t .Parallel ()
302
302
storage , deferFunc := p .CreateStorage ()
303
303
defer deferFunc ()
@@ -316,8 +316,8 @@ func testStorage_UpdateAdderss_UpdatesValue(t *testing.T, p PrepareInterface) {
316
316
assert .Equal (t , expectedAddress , node .Address , "Not updated address" )
317
317
}
318
318
319
- // testStorage_UpdateAdderss_ReturnsErrNotFound попытка обновить несуществующую ноду
320
- func testStorage_UpdateAdderss_ReturnsErrNotFound (t * testing.T , p PrepareInterface ) {
319
+ // TestStorage_UpdateAdderss_ReturnsErrNotFound попытка обновить несуществующую ноду
320
+ func TestStorage_UpdateAdderss_ReturnsErrNotFound (t * testing.T , p PrepareInterface ) {
321
321
t .Parallel ()
322
322
storage , deferFunc := p .CreateStorage ()
323
323
defer deferFunc ()
0 commit comments