-
Notifications
You must be signed in to change notification settings - Fork 1.6k
🌱 (ci): Fix mock for alpha update e2e tests #4938
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
🌱 (ci): Fix mock for alpha update e2e tests #4938
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
07b5c5e
to
5230ffb
Compare
typesFile := filepath.Join(projectDir, "api", "v1", "testoperator_types.go") | ||
err := pluginutil.InsertCode( |
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.
In the POC we are replacing the code
@vitorfloriano
return ctrl.Result{}, err | ||
} | ||
|
||
log.Info("testOperator reconciled")` |
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.
KISS and leave in a const for we check out
@vitorfloriano
if kbc != nil { | ||
kbc.Destroy() | ||
} | ||
_ = os.RemoveAll(kbc.Dir) |
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.
We should always remove the directory
If we call Destroy it will remove the image
@vitorfloriano
Size int32 `+"`json:\"size,omitempty\"`", | ||
) | ||
Expect(err).NotTo(HaveOccurred()) | ||
controllerFile := filepath.Join(projectDir, "internal", "controller", "testoperator_controller.go") | ||
err = pluginutil.InsertCode( |
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.
We need to replace the TODO
and log . See that the log format changed from one to another
c/c @vitorfloriano
I am moving forward here to unblock @vitorfloriano in : #4936 |
The mock is doing inserts instead of replaces
We want a simple mock to ensure a scenario without conflicts