-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix maestro tests #91
Fix maestro tests #91
Conversation
api/room_handler_test.go
Outdated
}, | ||
}, gomock.Any()) | ||
}, gomock.Any()).AnyTimes() |
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.
It is not ideal to use AnyTimes. If possible assert that HGet is called the exact number of times it should
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.
Yeah, it's not needed here. It's only called one time
@@ -1361,23 +1367,25 @@ cmd: | |||
}) | |||
|
|||
Describe("ScaleUp", func() { | |||
BeforeEach(func() { | |||
config.Set("watcher.maxScaleUpAmount", 100) |
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.
Don't we need to unset this value after?
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.
Sure, I will change this. I thought config was being reset every test but it was because I was running only one test separately.
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.
LGTM. Can we remove the commented code? Like here.
This branch fixes all tests from branch https://github.com/topfreegames/maestro/tree/refactor/rolling-update-progress