File tree Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Expand file tree Collapse file tree 3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,19 @@ func GetTag() string {
3838}
3939
4040func SetImage (image string ) {
41- parts := strings .SplitN (image , ":" , 2 )
42- repository = parts [ 0 ]
43-
44- if len ( parts ) == 2 {
45- tag = parts [1 ]
41+ if strings .Contains (image , "@" ) {
42+ // Handle digest format: repo@sha256:xxx
43+ parts := strings . SplitN ( image , "@" , 2 )
44+ repository = parts [ 0 ]
45+ tag = "@" + parts [1 ]
4646 } else {
47- tag = ""
47+ // Handle tag format: repo:tag
48+ parts := strings .SplitN (image , ":" , 2 )
49+ repository = parts [0 ]
50+ if len (parts ) == 2 {
51+ tag = parts [1 ]
52+ } else {
53+ tag = ""
54+ }
4855 }
4956}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ var _ = Describe("Node sync",
5050 It ("Sync nodes using label selector" , func (ctx context.Context ) {
5151
5252 hostname := constants .GetClusterName () + "-control-plane"
53- if kindName , ok := os .LookupEnv ("KIND_NAME" ); ok {
53+ if kindName , ok := os .LookupEnv ("KIND_NAME" ); ok && kindName != "" {
5454 hostname = kindName + "-control-plane"
5555 }
5656 Eventually (func (g Gomega ) {
@@ -70,7 +70,8 @@ var _ = Describe("Node sync",
7070 }
7171
7272 g .Expect (hostSyncedNodeName ).ToNot (BeEmpty (), "Should find host node with matching hostname" )
73- g .Expect (hostSyncedNodeName ).To (Equal (virtualNodes .Items [0 ].Name ), "Synced node name should match" )
73+ g .Expect (virtualNodes .Items ).To (HaveLen (1 ), "Expected exactly one synced node" )
74+ g .Expect (virtualNodes .Items [0 ].Name ).To (Equal (hostSyncedNodeName ), "Synced node name should match" )
7475 }).
7576 WithPolling (constants .PollingInterval ).
7677 WithTimeout (constants .PollingTimeout ).
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ var _ = Describe("Helm charts (regular and OCI) are synced and applied as expect
8181 }
8282 }).
8383 WithPolling (constants .PollingInterval ).
84- WithTimeout (constants .PollingTimeoutShort ).
84+ WithTimeout (constants .PollingTimeout ).
8585 Should (Succeed (), "Both charts should be successfully deployed" )
8686 })
8787
You can’t perform that action at this time.
0 commit comments