Commit Graph

7 Commits

Author SHA1 Message Date
Patrick Ohly 3dc5e5ffdf test: fix ginkgolinter issues
All of these issues were reported by https://github.com/nunnatsa/ginkgolinter.
Fixing these issues is useful (several expressions get simpler, using
framework.ExpectNoError is better because it has additional support for
failures) and a necessary step for enabling that linter in our golangci-lint
invocation.

Kubernetes-commit: 41f23f52d09689ede3540b8bd3ef7ec4f09410a1
2023-02-22 10:35:09 +01:00
Arda Güçlü 89edfadfa3 Use OpenAPI to determine patch type in kubectl apply patching
Currently `kubectl apply` determines correct patch type for given
GVKs by trying to register schema and if it succeeds, it uses
strategic-merge-patch.

But OpenAPI endpoint already stores which patch types are supported
by GVKs. This PR checks OpenAPI endpoint to retrieve patch type,
if OpenAPI is enabled. If it is not enabled, patch type determination
will be done as conventional registration method.

Kubernetes-commit: cddbb0c56397448ac0489f0473a26601c1feece8
2022-06-08 13:12:16 +03:00
Dave Chen 1405be3f62 update ginkgo from v1 to v2 and gomega to 1.19.0
- update all the import statements
- run hack/pin-dependency.sh to change pinned dependency versions
- run hack/update-vendor.sh to update go.mod files and the vendor directory
- update the method signatures for custom reporters

Signed-off-by: Dave Chen <dave.chen@arm.com>

Kubernetes-commit: 857458cfa5b0083bc55736aaccbcf1dc796ba320
2022-03-29 14:12:12 +08:00
haoyun 343b5260f3 fix: combine assertion prevent npe
Signed-off-by: haoyun <yun.hao@daocloud.io>

Kubernetes-commit: 84a7329cf07b468ea47fd0617e6fdb9bdb174937
2021-12-01 16:37:24 +08:00
Maciej Szulik 10f53d93f7 Fix kubectl openapi test to use apps/v1/Deployment
Kubernetes-commit: 7c194bb3e3daaadcf0bb785a16bffb3c1add274f
2021-03-01 19:24:15 +01:00
Sean Sullivan 3ec9685c39 Rename test/data directory to testdata
Kubernetes-commit: 4ce97d6c48ae4735463f020430dd20539a03e8c5
2019-10-31 13:40:02 -07:00
Sean Sullivan a18ed087c5 Move pkg/kubectl/cmd/util/openapi to staging
Kubernetes-commit: 7a64a66d61648ff0768837593d8066d828af262c
2019-07-25 21:49:49 -07:00