Commit Graph

19 Commits

Author SHA1 Message Date
Eddy Filip
a84b5337ea Don't redefine the err variable
Since we take immediate action when getting the error of a function, we can stop redefining it in following steps and use one err variable in the entire function.
2023-01-04 14:09:04 +02:00
Eddy Filip
cd1c978d18 Remove duplicated code for deleting k8s secret and handle an error 2023-01-04 14:05:33 +02:00
Eddy Filip
710de1bbc0 Adjust OnePasswordItem test resource names
This is made to eliminate the chance of tests being flaky when run in aprallel
2022-10-26 15:18:34 +02:00
volodymyrZotov
d99abbd432 use unique onepassword name in each spec 2022-10-26 11:31:54 +03:00
volodymyrZotov
30a1c136dc generate random version each time calling mock onepassword item 2022-10-25 18:00:41 +03:00
Eddy Filip
d8bfa318f2 Adjust code 2022-10-24 14:09:17 +02:00
Eddy Filip
1d1d824ff4 Adjust context 2022-10-24 13:57:31 +02:00
volodymyrZotov
20f81f5b0f update tests 2022-10-20 11:08:56 +03:00
volodymyrZotov
1a8bd75bc8 refactor tests 2022-09-21 13:24:24 +03:00
volodymyrZotov
256b1e09fd added tests for deployment_controller 2022-09-21 12:09:40 +03:00
volodymyrZotov
11b1eae4e1 cover onepassworditem_controller with tests 2022-09-19 18:49:57 +03:00
volodymyrZotov
108cdac29b add "Should not update K8s secret testcase" 2022-09-15 18:08:56 +03:00
Eddy Filip
91eb658d70 Add TODOs for missing tests that need to be migrated 2022-09-13 20:08:10 +03:00
Eddy Filip
87ff93daad Add some tests for both the API Resource Controller and the Deployment Controller 2022-09-13 16:34:36 +03:00
Eddy Filip
5e496d2e77 Upgrade to GinkGo v2
Ginkgo has switched to v2 and we should make use of it instead. It doesn't affect how we make tests, but we get the latest enhancements and improvements on the ways tests are executed.
2022-09-13 16:31:08 +03:00
Eddy Filip
250785f4af Migrate Deployment Controller 2022-09-13 16:05:29 +03:00
Eddy Filip
622fcd64b8 Add packages
- Add the packages that help the operator work as expected.
- Update `go.mod` by running `go mod tidy`.
2022-09-13 15:40:39 +03:00
Eddy Filip
96b78795af Implement the OnePasswordItem Controller
- Migrate the functionality of the Controller for the OnePasswordItem resource.
- Add the RBAC markers that will generate the RBAC permissions.
- Run `make manifests` to generate the RBAC permissions.
2022-09-13 15:21:40 +03:00
Eddy Filip
a3de05fbdb Create OnePasswordItem API and controller
Command executed: `operator-sdk create api --version v1 --kind OnePasswordItem --resource --controller`
`--group` flag is skipped because we don't have a group in the previous version of the operator and we want to make things consistent and not bring any breaking changes.
2022-09-13 14:51:50 +03:00