From 7a04afdfa850d472ae7e2184f80a9e40c2eda20f Mon Sep 17 00:00:00 2001 From: David Allen Date: Mon, 16 Sep 2024 08:54:29 -0600 Subject: [PATCH] Added API tests --- tests/api_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/api_test.go b/tests/api_test.go index 20b397a..8d10489 100644 --- a/tests/api_test.go +++ b/tests/api_test.go @@ -146,6 +146,17 @@ func TestListCommand(t *testing.T) { func TestUpdateCommand(t *testing.T) { // TODO: add test that does a Redfish simple update checking it success and // failure points + var ( + cmd *exec.Cmd + err error + output []byte + ) + // set up temporary directory + cmd = exec.Command("bash", "-c", fmt.Sprintf("%s list", *exePath)) + output, err = cmd.CombinedOutput() + if err != nil { + t.Fatalf("failed to run 'list' command: %v", err) + } } func TestGofishFunctions(t *testing.T) {