fix go mod and change tag version to 1.0.3
[ric-plt/e2mgr.git] / Automation / Tests / Get-All-Nodes / Get_nodes_Add_nodes_and_get.robot
1 *** Settings ***
2 Suite Setup  Flush Redis
3 Library      Process
4 Resource   ../Resource/resource.robot
5 Library     OperatingSystem
6 Library     REST      ${url}
7
8
9 *** Variables ***
10 ${file}     ${CURDIR}/addtoredis.py
11 ${flush_file}     ${CURDIR}/flush.py
12
13 *** Test Cases ***
14 Add nodes to redis db
15     ${result}=  Run Process    python3.6    ${file}
16     Should Be Equal As Strings      ${result.stdout}        Insert successfully to Redis
17
18
19 Get all node ids
20     ${result}=  GET     v1/nodeb-ids
21     #Output
22     Integer  response status   200
23     String   response body 0 inventoryName  test1
24     String   response body 0 globalNbId plmnId   02f829
25     String   response body 0 globalNbId nbId     007a80
26     String   response body 1 inventoryName  test2
27     String   response body 1 globalNbId plmnId   03f829
28     String   response body 1 globalNbId nbId     001234
29
30
31
32 *** Keywords ***
33 Flush Redis
34     ${result}=  Run Process    python3.6    ${flush_file}
35     Should Be Equal As Strings      ${result.stdout}        Flush Success
36
37
38
39
40
41
42