-
Notifications
You must be signed in to change notification settings - Fork 2
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
chore: refactor tests #96
Conversation
- Simplify tests while keeping all scenarios under test - Modify tests to have a consistent style - Move log lines tests to the logger tests instead of the upgrader tests [#185853346](https://www.pivotaltracker.com/story/show/185853346)
State: "failed", | ||
}, | ||
} | ||
} |
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.
praise: thank you very much. It is easier to understand the obtained data when something fails
} | ||
|
||
func fullInstance(name, guid string, upgradeAvailable bool, lastOperationType, lastOperationState string) ccapi.ServiceInstance { | ||
func indexedInstance(index int, upgradeAvailable bool) ccapi.ServiceInstance { |
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.
praise: very readable
fakeInstanceCreateFailed ccapi.ServiceInstance | ||
fakeInstanceDestroyFailed ccapi.ServiceInstance | ||
fakeServiceInstances []ccapi.ServiceInstance | ||
fakeServiceInstancesNoUpgrade []ccapi.ServiceInstance |
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.
praise: great contribution
fakeCFClient.GetServicePlansReturns([]ccapi.Plan{}, nil) | ||
|
||
err := upgrader.Upgrade(fakeCFClient, fakeBrokerName, 1, false, true, fakeLog) | ||
Expect(err).To(MatchError(fmt.Sprintf("no service plans available for broker: %s", fakeBrokerName))) |
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.
praise: fantastic!
@@ -108,28 +106,6 @@ func (l *Logger) FinalTotals() { | |||
logRowFormatTotals(l) | |||
} | |||
|
|||
//lint:ignore U1000 Ignore unused function temporarily for better code review | |||
func logOldFormatTotals(l *Logger) { |
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.
praise: great catch
#185853346
Checklist:
* [ ] Have you added Release Notes in the docs respositories?