File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -175,11 +175,11 @@ var _ = Describe("Service accounts management", func() {
175175 It ("should correctly set the labels" , func () {
176176 Expect (output .Labels ).To (HaveKeyWithValue (forge .LiqoOriginClusterIDKey , string (LocalClusterID )))
177177 Expect (output .Labels ).To (HaveKeyWithValue (forge .LiqoDestinationClusterIDKey , string (RemoteClusterID )))
178- Expect (output .Labels ).To (HaveKeyWithValue (forge .LiqoSASecretForPodNameKey , "pod" ))
179178 Expect (output .Labels ).To (HaveKeyWithValue (forge .LiqoSASecretForServiceAccountKey , "sa" ))
180179 })
181180
182181 It ("should correctly set the annotations" , func () {
182+ Expect (output .Annotations ).To (HaveKeyWithValue (forge .LiqoSASecretForPodNameKey , "pod" ))
183183 Expect (output .Annotations ).To (HaveKeyWithValue (forge .LiqoSASecretForPodUIDKey , "pod-uid" ))
184184 Expect (output .Annotations ).To (HaveKeyWithValue (
185185 forge .LiqoSASecretExpirationKey , time .Now ().Add (1600 * time .Second ).Format (time .RFC3339 )))
Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ var _ = Describe("ServiceAccount Reflection", func() {
108108 l := labels .Merge (forge .ReflectionLabels (), forge .RemoteServiceAccountSecretLabels (& tokens ))
109109 l = labels .Merge (l , map [string ]string {forge .LiqoOriginClusterNodeName : LiqoNodeName })
110110 remote .SetLabels (l )
111+ remote .SetAnnotations (forge .RemoteServiceAccountSecretAnnotations (& tokens ))
111112 CreateSecret (remote )
112113 }
113114 })
@@ -208,8 +209,8 @@ var _ = Describe("ServiceAccount Reflection", func() {
208209 remoteAfter := GetSecret (RemoteNamespace )
209210 Expect (remoteAfter .Labels ).To (HaveKeyWithValue (forge .LiqoOriginClusterIDKey , LocalClusterID ))
210211 Expect (remoteAfter .Labels ).To (HaveKeyWithValue (forge .LiqoDestinationClusterIDKey , RemoteClusterID ))
211- Expect (remoteAfter .Labels ).To (HaveKeyWithValue (forge .LiqoSASecretForPodNameKey , PodName ))
212212 Expect (remoteAfter .Labels ).To (HaveKeyWithValue (forge .LiqoSASecretForServiceAccountKey , ServiceAccountName ))
213+ Expect (remoteAfter .Annotations ).To (HaveKeyWithValue (forge .LiqoSASecretForPodNameKey , PodName ))
213214 Expect (remoteAfter .Annotations ).To (HaveKeyWithValue (forge .LiqoSASecretForPodUIDKey , string (local .GetUID ())))
214215 Expect (remoteAfter .Annotations ).To (HaveKey (forge .LiqoSASecretExpirationKey ))
215216 })
You can’t perform that action at this time.
0 commit comments