@@ -27,55 +27,55 @@ func TestExtractKubernetesVersionFromImageName(t *testing.T) {
2727 wantErr bool
2828 }{
2929 {
30- name : "nkp ubuntu vgpu image" ,
31- imageName : "nkp -ubuntu-22.04-vgpu-1.32.3-20250604180644" ,
30+ name : "kubedistro ubuntu vgpu image" ,
31+ imageName : "kubedistro -ubuntu-22.04-vgpu-1.32.3-20250604180644" ,
3232 want : "1.32.3" ,
3333 wantErr : false ,
3434 },
3535 {
36- name : "nkp rocky release cis image" ,
37- imageName : "nkp -rocky-9.5-release-cis-1.32.3-20250430150550" ,
36+ name : "kubedistro rocky release cis image" ,
37+ imageName : "kubedistro -rocky-9.5-release-cis-1.32.3-20250430150550" ,
3838 want : "1.32.3" ,
3939 wantErr : false ,
4040 },
4141 {
42- name : "nkp rhel fips image" ,
43- imageName : "nkp -rhel-8.10-fips-1.32.3-20250505212227" ,
42+ name : "kubedistro rhel fips image" ,
43+ imageName : "kubedistro -rhel-8.10-fips-1.32.3-20250505212227" ,
4444 want : "1.32.3" ,
4545 wantErr : false ,
4646 },
4747 {
48- name : "nkp rocky basic image" ,
49- imageName : "nkp -rocky-9.5-1.32.3-20250514222748" ,
48+ name : "kubedistro rocky basic image" ,
49+ imageName : "kubedistro -rocky-9.5-1.32.3-20250514222748" ,
5050 want : "1.32.3" ,
5151 wantErr : false ,
5252 },
5353 {
5454 name : "different k8s version" ,
55- imageName : "nkp -ubuntu-22.04-1.31.5-20250101000000" ,
55+ imageName : "kubedistro -ubuntu-22.04-1.31.5-20250101000000" ,
5656 want : "1.31.5" ,
5757 wantErr : false ,
5858 },
5959 {
60- name : "custom image name with kubernetes-version at end" , // e.g., not following NKP naming convention
60+ name : "custom image name with kubernetes-version at end" , // e.g., not following kubedistro naming convention
6161 imageName : "custom-image-v1.23" ,
6262 want : "1.23" ,
6363 wantErr : false ,
6464 },
6565 {
66- name : "custom image name with kubernetes version in middle" , // e.g., not following NKP naming convention
66+ name : "custom image name with kubernetes version in middle" , // e.g., not following kubedistro naming convention
6767 imageName : "custom-v1.23.1-image" ,
6868 want : "1.23.1" ,
6969 wantErr : false ,
7070 },
7171 {
72- name : "custom image name with kubernetes version in start" , // e.g., not following NKP naming convention
72+ name : "custom image name with kubernetes version in start" , // e.g., not following kubedistro naming convention
7373 imageName : "v1.23.1-alpha-custom-image" ,
7474 want : "1.23.1" ,
7575 wantErr : false ,
7676 },
7777 {
78- name : "custom image name - no match" , // e.g., not following NKP naming convention
78+ name : "custom image name - no match" , // e.g., not following kubedistro naming convention
7979 imageName : "my-custom-image-name" ,
8080 want : "" ,
8181 wantErr : true ,
@@ -119,7 +119,7 @@ func TestVMImageCheckWithKubernetesVersion(t *testing.T) {
119119 err := resp .SetData (vmmv4.Image {
120120 ObjectType_ : ptr .To ("vmm.v4.content.Image" ),
121121 ExtId : ptr .To ("test-uuid" ),
122- Name : ptr .To ("nkp -ubuntu-22.04-vgpu-1.32.3-20250604180644" ),
122+ Name : ptr .To ("kubedistro -ubuntu-22.04-vgpu-1.32.3-20250604180644" ),
123123 })
124124 require .NoError (t , err )
125125 return resp , nil
@@ -144,7 +144,7 @@ func TestVMImageCheckWithKubernetesVersion(t *testing.T) {
144144 err := resp .SetData (vmmv4.Image {
145145 ObjectType_ : ptr .To ("vmm.v4.content.Image" ),
146146 ExtId : ptr .To ("test-uuid" ),
147- Name : ptr .To ("nkp -ubuntu-22.04-vgpu-1.31.5-20250604180644" ),
147+ Name : ptr .To ("kubedistro -ubuntu-22.04-vgpu-1.31.5-20250604180644" ),
148148 })
149149 require .NoError (t , err )
150150 return resp , nil
@@ -162,7 +162,7 @@ func TestVMImageCheckWithKubernetesVersion(t *testing.T) {
162162 Error : true ,
163163 Causes : []preflight.Cause {
164164 {
165- Message : "kubernetes version mismatch: cluster version '1.32.3' does not match image version '1.31.5' (from image name 'nkp -ubuntu-22.04-vgpu-1.31.5-20250604180644')" , //nolint:lll // cause is long
165+ Message : "kubernetes version mismatch: cluster version '1.32.3' does not match image version '1.31.5' (from image name 'kubedistro -ubuntu-22.04-vgpu-1.31.5-20250604180644')" , //nolint:lll // cause is long
166166 Field : "test-field" ,
167167 },
168168 },
0 commit comments