@@ -962,10 +962,6 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
962962 "some-key" : []byte ("some-value" ),
963963 }
964964 secretObject := & corev1.Secret {
965- TypeMeta : metav1.TypeMeta {
966- Kind : "Secret" ,
967- APIVersion : "v1" ,
968- },
969965 ObjectMeta : metav1.ObjectMeta {
970966 Name : "secret-one" ,
971967 Namespace : "default" ,
@@ -975,8 +971,6 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
975971
976972 secretApplyConfiguration := corev1applyconfigurations .
977973 Secret ("secret-two" , "default" ).
978- WithAPIVersion ("v1" ).
979- WithKind ("Secret" ).
980974 WithData (data )
981975
982976 err = cl .Create (ctx , secretObject )
@@ -985,11 +979,11 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
985979 err = cl .Apply (ctx , secretApplyConfiguration , & client.ApplyOptions {FieldManager : "test-manager" })
986980 Expect (err ).NotTo (HaveOccurred ())
987981
988- cm , err := clientset .CoreV1 ().Secrets (ptr .Deref (secretApplyConfiguration .GetNamespace (), "" )).Get (ctx , ptr .Deref (secretApplyConfiguration .GetName (), "" ), metav1.GetOptions {})
982+ secret , err := clientset .CoreV1 ().Secrets (ptr .Deref (secretApplyConfiguration .GetNamespace (), "" )).Get (ctx , ptr .Deref (secretApplyConfiguration .GetName (), "" ), metav1.GetOptions {})
989983 Expect (err ).NotTo (HaveOccurred ())
990984
991- Expect (cm .Data ).To (BeComparableTo (data ))
992- Expect (cm .Data ).To (BeComparableTo (secretApplyConfiguration .Data ))
985+ Expect (secret .Data ).To (BeComparableTo (data ))
986+ Expect (secret .Data ).To (BeComparableTo (secretApplyConfiguration .Data ))
993987
994988 data = map [string ][]byte {
995989 "some-key" : []byte ("some-new-value" ),
@@ -999,11 +993,11 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
999993 err = cl .Apply (ctx , secretApplyConfiguration , & client.ApplyOptions {FieldManager : "test-manager" })
1000994 Expect (err ).NotTo (HaveOccurred ())
1001995
1002- cm , err = clientset .CoreV1 ().Secrets (ptr .Deref (secretApplyConfiguration .GetNamespace (), "" )).Get (ctx , ptr .Deref (secretApplyConfiguration .GetName (), "" ), metav1.GetOptions {})
996+ secret , err = clientset .CoreV1 ().Secrets (ptr .Deref (secretApplyConfiguration .GetNamespace (), "" )).Get (ctx , ptr .Deref (secretApplyConfiguration .GetName (), "" ), metav1.GetOptions {})
1003997 Expect (err ).NotTo (HaveOccurred ())
1004998
1005- Expect (cm .Data ).To (BeComparableTo (data ))
1006- Expect (cm .Data ).To (BeComparableTo (secretApplyConfiguration .Data ))
999+ Expect (secret .Data ).To (BeComparableTo (data ))
1000+ Expect (secret .Data ).To (BeComparableTo (secretApplyConfiguration .Data ))
10071001 })
10081002 })
10091003 })
0 commit comments