@@ -17,14 +17,15 @@ import (
1717
1818func TestCheckParameters (t * testing.T ) {
1919 createServiceImages := func (
20- image string , cocoImage string , hubImage string , salineImage string , dbImage string ,
20+ image string , cocoImage string , hubImage string , salineImage string , dbImage string , tftpImage string ,
2121 ) map [string ]string {
2222 return map [string ]string {
2323 podman .ServerService : image ,
2424 podman .ServerAttestationService + "@" : cocoImage ,
2525 podman .HubXmlrpcService : hubImage ,
2626 podman .SalineService + "@" : salineImage ,
2727 podman .DBService : dbImage ,
28+ podman .TFTPService : tftpImage ,
2829 }
2930 }
3031 type testData struct {
@@ -35,19 +36,21 @@ func TestCheckParameters(t *testing.T) {
3536 expectedHubImage string
3637 expectedSalineImage string
3738 expectedDBImage string
39+ expectedTFTPImage string
3840 expectedError string
3941 }
4042
4143 data := []testData {
4244 {
43- createServiceImages ("registry.suse.com/suse/manager/5.0/x86_64/server:5.0.0" , "" , "" , "" , "" ),
45+ createServiceImages ("registry.suse.com/suse/manager/5.0/x86_64/server:5.0.0" , "" , "" , "" , "" , "" ),
4446 map [string ]bool {},
4547 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server:latest-ptf-5678" ,
4648 "" ,
4749 "" ,
4850 "" ,
4951 "" ,
5052 "" ,
53+ "" ,
5154 },
5255 {
5356 createServiceImages (
@@ -56,18 +59,21 @@ func TestCheckParameters(t *testing.T) {
5659 "registry.suse.com/suse/manager/5.0/x86_64/server-hub-xmlrpc-api:5.0.0" ,
5760 "registry.suse.com/suse/manager/5.0/x86_64/server-saline:5.0.0" ,
5861 "registry.suse.com/suse/manager/5.0/x86_64/server-postgresql:5.0.0" ,
62+ "registry.suse.com/suse/manager/5.0/x86_64/proxy-tftpd:5.0.0" ,
5963 ),
6064 map [string ]bool {
6165 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server-attestation:latest-ptf-5678" : true ,
6266 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server-hub-xmlrpc-api:latest-ptf-5678" : true ,
6367 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server-saline:latest-ptf-5678" : true ,
6468 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server-postgresql:latest-ptf-5678" : true ,
69+ "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/proxy-tftpd:latest-ptf-5678" : true ,
6570 },
6671 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server:latest-ptf-5678" ,
6772 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server-attestation:latest-ptf-5678" ,
6873 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server-hub-xmlrpc-api:latest-ptf-5678" ,
6974 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server-saline:latest-ptf-5678" ,
7075 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server-postgresql:latest-ptf-5678" ,
76+ "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/proxy-tftpd:latest-ptf-5678" ,
7177 "" ,
7278 },
7379 {
@@ -77,6 +83,7 @@ func TestCheckParameters(t *testing.T) {
7783 "" ,
7884 "" ,
7985 "" ,
86+ "" ,
8087 ),
8188 map [string ]bool {
8289 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server:latest-ptf-5678" : true ,
@@ -88,6 +95,7 @@ func TestCheckParameters(t *testing.T) {
8895 "" ,
8996 "" ,
9097 "" ,
98+ "" ,
9199 },
92100 {
93101 createServiceImages (
@@ -96,6 +104,7 @@ func TestCheckParameters(t *testing.T) {
96104 "registry.suse.com/suse/manager/5.0/x86_64/server-hub-xmlrpc-api:5.0.0" ,
97105 "" ,
98106 "" ,
107+ "" ,
99108 ),
100109 map [string ]bool {
101110 "registry.suse.com/a/1234/5678/suse/manager/5.0/x86_64/server-hub-xmlrpc-api:latest-ptf-5678" : true ,
@@ -105,6 +114,7 @@ func TestCheckParameters(t *testing.T) {
105114 "" ,
106115 "" ,
107116 "" ,
117+ "" ,
108118 "failed to find server image" ,
109119 },
110120 }
0 commit comments