@@ -960,10 +960,6 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
960960 "some-key" : []byte ("some-value" ),
961961 }
962962 secretObject := & corev1.Secret {
963- TypeMeta : metav1.TypeMeta {
964- Kind : "Secret" ,
965- APIVersion : "v1" ,
966- },
967963 ObjectMeta : metav1.ObjectMeta {
968964 Name : "secret-one" ,
969965 Namespace : "default" ,
@@ -973,8 +969,6 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
973969
974970 secretApplyConfiguration := corev1applyconfigurations .
975971 Secret ("secret-two" , "default" ).
976- WithAPIVersion ("v1" ).
977- WithKind ("Secret" ).
978972 WithData (data )
979973
980974 err = cl .Create (ctx , secretObject )
@@ -983,11 +977,11 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
983977 err = cl .Apply (ctx , secretApplyConfiguration , & client.ApplyOptions {FieldManager : "test-manager" })
984978 Expect (err ).NotTo (HaveOccurred ())
985979
986- cm , err := clientset .CoreV1 ().Secrets (ptr .Deref (secretApplyConfiguration .GetNamespace (), "" )).Get (ctx , ptr .Deref (secretApplyConfiguration .GetName (), "" ), metav1.GetOptions {})
980+ secret , err := clientset .CoreV1 ().Secrets (ptr .Deref (secretApplyConfiguration .GetNamespace (), "" )).Get (ctx , ptr .Deref (secretApplyConfiguration .GetName (), "" ), metav1.GetOptions {})
987981 Expect (err ).NotTo (HaveOccurred ())
988982
989- Expect (cm .Data ).To (BeComparableTo (data ))
990- Expect (cm .Data ).To (BeComparableTo (secretApplyConfiguration .Data ))
983+ Expect (secret .Data ).To (BeComparableTo (data ))
984+ Expect (secret .Data ).To (BeComparableTo (secretApplyConfiguration .Data ))
991985
992986 data = map [string ][]byte {
993987 "some-key" : []byte ("some-new-value" ),
@@ -997,11 +991,11 @@ U5wwSivyi7vmegHKmblOzNVKA5qPO8zWzqBC
997991 err = cl .Apply (ctx , secretApplyConfiguration , & client.ApplyOptions {FieldManager : "test-manager" })
998992 Expect (err ).NotTo (HaveOccurred ())
999993
1000- cm , err = clientset .CoreV1 ().Secrets (ptr .Deref (secretApplyConfiguration .GetNamespace (), "" )).Get (ctx , ptr .Deref (secretApplyConfiguration .GetName (), "" ), metav1.GetOptions {})
994+ secret , err = clientset .CoreV1 ().Secrets (ptr .Deref (secretApplyConfiguration .GetNamespace (), "" )).Get (ctx , ptr .Deref (secretApplyConfiguration .GetName (), "" ), metav1.GetOptions {})
1001995 Expect (err ).NotTo (HaveOccurred ())
1002996
1003- Expect (cm .Data ).To (BeComparableTo (data ))
1004- Expect (cm .Data ).To (BeComparableTo (secretApplyConfiguration .Data ))
997+ Expect (secret .Data ).To (BeComparableTo (data ))
998+ Expect (secret .Data ).To (BeComparableTo (secretApplyConfiguration .Data ))
1005999 })
10061000 })
10071001 })
0 commit comments