summaryrefslogtreecommitdiff
path: root/test/e2e/generate_kube_test.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-03-11 16:10:32 +0100
committerPaul Holzinger <pholzing@redhat.com>2022-03-15 14:48:08 +0100
commita0ad1f2ad46507f13a16d342b9ccf35a38bae3d5 (patch)
tree2b2d70b7961c6373a3ff3674cd909501739b80f9 /test/e2e/generate_kube_test.go
parent918fc88a983ea1c1ee7e0abb0fc1dce3c0a35be3 (diff)
downloadpodman-a0ad1f2ad46507f13a16d342b9ccf35a38bae3d5.tar.gz
podman-a0ad1f2ad46507f13a16d342b9ccf35a38bae3d5.tar.bz2
podman-a0ad1f2ad46507f13a16d342b9ccf35a38bae3d5.zip
remove unneeded k8s code
There is a lot of unneeded code, k8s is the by far the biggest dependency in podman. We should remove as much as possible so that we only have the stuff left that we use. This is just a quick skim over the code which removes a lot of the generated code and many packages that are now unused. I know that this will be impossible to properly review. I will try to make smaller changes in follow up work. Right now this reduces about 8 MB in binary size!!! [NO NEW TESTS NEEDED] Hopefully existing tests will catch any problems. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test/e2e/generate_kube_test.go')
-rw-r--r--test/e2e/generate_kube_test.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go
index a0e6ccce6..44c906eed 100644
--- a/test/e2e/generate_kube_test.go
+++ b/test/e2e/generate_kube_test.go
@@ -1018,7 +1018,7 @@ USER test1`
pvc := new(v1.PersistentVolumeClaim)
err := yaml.Unmarshal(kube.Out.Contents(), pvc)
Expect(err).To(BeNil())
- Expect(pvc.GetName()).To(Equal(vol))
+ Expect(pvc.Name).To(Equal(vol))
Expect(pvc.Spec.AccessModes[0]).To(Equal(v1.ReadWriteOnce))
Expect(pvc.Spec.Resources.Requests.Storage().String()).To(Equal("1Gi"))
})
@@ -1040,11 +1040,11 @@ USER test1`
pvc := new(v1.PersistentVolumeClaim)
err := yaml.Unmarshal(kube.Out.Contents(), pvc)
Expect(err).To(BeNil())
- Expect(pvc.GetName()).To(Equal(vol))
+ Expect(pvc.Name).To(Equal(vol))
Expect(pvc.Spec.AccessModes[0]).To(Equal(v1.ReadWriteOnce))
Expect(pvc.Spec.Resources.Requests.Storage().String()).To(Equal("1Gi"))
- for k, v := range pvc.GetAnnotations() {
+ for k, v := range pvc.Annotations {
switch k {
case util.VolumeDeviceAnnotation:
Expect(v).To(Equal(volDevice))
@@ -1069,7 +1069,7 @@ USER test1`
err := yaml.Unmarshal(kube.Out.Contents(), pod)
Expect(err).To(BeNil())
- Expect(pod.GetAnnotations()).To(HaveKeyWithValue("io.containers.autoupdate/top", "local"))
+ Expect(pod.Annotations).To(HaveKeyWithValue("io.containers.autoupdate/top", "local"))
})
It("podman generate kube on pod with auto update labels in all containers", func() {
@@ -1096,8 +1096,8 @@ USER test1`
Expect(pod.Spec.Containers[1].WorkingDir).To(Equal("/root"))
for _, ctr := range []string{"top1", "top2"} {
- Expect(pod.GetAnnotations()).To(HaveKeyWithValue("io.containers.autoupdate/"+ctr, "registry"))
- Expect(pod.GetAnnotations()).To(HaveKeyWithValue("io.containers.autoupdate.authfile/"+ctr, "/some/authfile.json"))
+ Expect(pod.Annotations).To(HaveKeyWithValue("io.containers.autoupdate/"+ctr, "registry"))
+ Expect(pod.Annotations).To(HaveKeyWithValue("io.containers.autoupdate.authfile/"+ctr, "/some/authfile.json"))
}
})