Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ toward the shared goals of the project.
- Tests should go in `_test.go` files alongside the code they test.
- Use testdata fixtures for CLI output parsing tests (see
`pkg/implementation/raidcontroller/megaraid/testdata/` for examples).
- For storcli2 / perccli2 fixtures, capture them with the helper script in
`tests/testdata-tools/` and copy the result into each component package's
`testdata/storcli2/` directory (see `tests/testdata-tools/README.md`).
- Run the full test suite with `make tests` and ensure all tests pass.
- Run `make lint` to verify your code passes all linter checks.

Expand Down
14 changes: 14 additions & 0 deletions pkg/implementation/blinker/testdata/storcli2/start.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"Controllers":[
{
"Command Status" : {
"CLI Version" : "008.0005.0000.0010 Feb 22, 2023",
"Operating system" : "Linux4.18.0-553.115.1.el8_10.x86_64",
"Controller" : "0",
"Status" : "Success",
"Description" : "Start PD Locate Succeeded."
}
}
]
}

14 changes: 14 additions & 0 deletions pkg/implementation/blinker/testdata/storcli2/stop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"Controllers":[
{
"Command Status" : {
"CLI Version" : "008.0005.0000.0010 Feb 22, 2023",
"Operating system" : "Linux4.18.0-553.115.1.el8_10.x86_64",
"Controller" : "0",
"Status" : "Success",
"Description" : "Stop PD Locate Succeeded."
}
}
]
}

44 changes: 44 additions & 0 deletions pkg/implementation/controllergetter/testdata/storcli2/all.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"Controllers":[
{
"Command Status" : {
"CLI Version" : "008.0005.0000.0010 Feb 22, 2023",
"Operating system" : "Linux4.18.0-553.115.1.el8_10.x86_64",
"Status Code" : 0,
"Status" : "Success",
"Description" : "None"
},
"Response Data" : {
"Number of Controllers" : 1,
"Host Name" : "artesca-node",
"Operating System " : "Linux4.18.0-553.115.1.el8_10.x86_64",
"SL8 Library Version" : "08.0507.0000",
"System Overview" : [
{
"Ctrl" : 0,
"Product Name" : "MegaRAID 9660-16i Tri-Mode Storage Adapter",
"SASAddress" : "0X500062B22066D540",
"Personality" : "RAID",
"Status" : "Optimal",
"PD(s)" : 24,
"VD(s)" : 24,
"VNOpt" : 0,
"EPack" : "Optimal"
}
],
"ASO" : [
{
"Ctrl" : 0,
"RP" : "U",
"R0/00" : "U",
"R1/10" : "U",
"R5/50" : "U",
"R6/60" : "U",
"JBOD" : "U"
}
]
}
}
]
}

Loading