Skip to content

Commit

Permalink
Added empty controller test
Browse files Browse the repository at this point in the history
  • Loading branch information
ralequi committed Jun 29, 2022
1 parent a827ea8 commit 9e27143
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
19 changes: 19 additions & 0 deletions tests/datatest/controllerSet/test00/_show_J.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"Controllers":[
{
"Command Status" : {
"CLI Version" : "007.1704.0000.0000 Jan 16, 2021",
"Operating system" : "Linux 5.18.5-200.fc36.x86_64",
"Status Code" : 0,
"Status" : "Success",
"Description" : "None"
},
"Response Data" : {
"Number of Controllers" : 0,
"Host Name" : "jenova",
"Operating System " : "Linux 5.18.5-200.fc36.x86_64"
}
}
]
}

3 changes: 3 additions & 0 deletions tests/datatest/controllerSet/test00/device.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"Controller_ids": []
}
7 changes: 6 additions & 1 deletion tests/datatest/controllerSet/test01/device.json
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
{}
{
"Controller_ids": [
0,
1
]
}
Empty file removed tests/datatest/storcliSet/.keep
Empty file.
3 changes: 2 additions & 1 deletion tests/test_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ def test_count_controllers(self, folder):
# List controllers
controllers = Controllers()

assert len(controllers.ids) > 0
if "Controller_ids" in device_data:
assert controllers.ids == device_data["Controller_ids"]

0 comments on commit 9e27143

Please sign in to comment.