-
Notifications
You must be signed in to change notification settings - Fork 152
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 failure due to changes done on ScaleWorkload replicas type #236
Conversation
case int32: | ||
val = int(rep.(int32)) | ||
case int64: | ||
val = int(rep.(int64)) |
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.
@SupriyaKasten Quick question. Was the failure caused by going into the default
statement?
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.
Yes @julio-lopez
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.
Invalid arg type int64 for Arg replicas
@@ -269,7 +269,7 @@ func (s *ScaleSuite) TestGetArgs(c *C) { | |||
}, | |||
}, | |||
args: map[string]interface{}{ | |||
ScaleWorkloadReplicas: "2", |
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.
This is removing the case for when the input is specified as a string, no? Shouldn't another test case be added instead? or where is this covered?
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.
So we do have one unit test that covers string input as well.
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.
OK, I see it above, got it. Thanks.
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.
let's use the assignment option in the typeswitch. that we you don't need to re-typecast in each case: https://tour.golang.org/methods/16
Should we merge and refactor in a followup? |
Sure! |
Change Overview
This PR fixes the e2e test failure:
Pull request type
Please check the type of change your PR introduces:
Test Plan