Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestion #1

Open
panboo-leo opened this issue Aug 18, 2023 · 1 comment
Open

suggestion #1

panboo-leo opened this issue Aug 18, 2023 · 1 comment

Comments

@panboo-leo
Copy link

Do you suggest splitting it into multiple files and adding some test code?

@blakehartshorn
Copy link
Owner

When I was working on this the first time (with a megaraid driver host) I'd just redirected the storcli command output to a text file. The second one was for the drives output. The test blocks are still hanging out in there commented out.

data, err := exec.Command(StorcliPath, "/cALL", "show", "all", "J").Output()
if err != nil {
log.Fatal(err)
}
/* TEST CASE - Temporarily use a text file
data, err := os.ReadFile("controllers.json")
if err != nil {
log.Fatal(err)
}
*/

/* TEST CASE - Temporarily use a text file
data, err := os.ReadFile("drives.json")
if err != nil {
log.Fatal(err)
}
*/
data, err := exec.Command(StorcliPath, "/cALL/eALL/sALL", "show", "all", "J").Output()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants