-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add skeleton structs #12
base: main
Are you sure you want to change the base?
Conversation
2af45c1
to
d6d0de8
Compare
pkg/test/test.go
Outdated
type Result struct { | ||
|
||
// what was tested | ||
Name string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary redundancy since result should be part of the Test
struct below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name is required to have things like a tescase for temperature sensors, similar to how it's already done in the existing tool. Since we do not write a new struct and new function for every sensor, one test will test all the temp sensors and return multiple Result structs.
Each Result struct will then have the name of the sensor tested.
So when we print the results, we print the Name from struct Test and also the Name from struct Result.
Example:
PASS [Test] [redfish sensors] [sensor VR_TEMP_1]
PASS [Test] [redfish sensors] [sensor VR_TEMP_2]
PASS [Test] [redfish sensors] [sensor VR_TEMP_3]
PASS [Test] [redfish sensors] [sensor SYS_AIR_INLET]
or
FAIL [Test] [redfish sensors] [sensor VR_TEMP_1] Error: could not query redfish
PASS [Test] [redfish sensors] [sensor VR_TEMP_2]
90f4a46
to
113b165
Compare
Define multiple structs to implement the tests. Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
Define multiple structs to implement the tests.