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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use mocks for TestInstanceStats_Get and TestObjectStorage_Cancel tests #427
Use mocks for TestInstanceStats_Get and TestObjectStorage_Cancel tests #427
Conversation
fixing verification and merging all commits (linode#347)
Can we create a unit test directory to hold all mocked tests or maybe making a |
I think we should make a new ticket for that, and maybe get Youjung's opinion on restructuring the test suite because I think mocks are scattered throughout the codebase at the moment. Thoughts? @zliang-akamai |
@amisiorek-akamai Ah yes, your are right, didn't realize that, lol |
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.
Tested locally and passed!
CPU: [][]float64{}, | ||
IO: linodego.StatsIO{ | ||
IO: [][]float64{}, | ||
Swap: [][]float64{}, | ||
}, | ||
NetV4: linodego.StatsNet{ | ||
In: [][]float64{}, | ||
Out: [][]float64{}, | ||
PrivateIn: [][]float64{}, | ||
PrivateOut: [][]float64{}, | ||
}, | ||
NetV6: linodego.StatsNet{ | ||
In: [][]float64{}, | ||
Out: [][]float64{}, | ||
PrivateIn: [][]float64{}, | ||
PrivateOut: [][]float64{}, | ||
}, | ||
}, |
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.
Could this be populated with some arbitrary data just to make sure everything unmarshals correctly?
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.
Looks good and tests pass locally, great work!
馃摑 Description
Makes mocks for TestInstanceStats_Get and TestObjectStorage_Cancel such that we no longer have to skip those tests.
鉁旓笍 How to Test
make test SKIP_LINT=1 ARGS="-run TestInstanceStats_Get"
make test SKIP_LINT=1 ARGS="-run TestObjectStorage_Cancel"