@@ -356,6 +356,51 @@ func TestInstallWithoutEmbed(t *testing.T) {
356356 t .Logf ("%s: test complete" , time .Now ().Format (time .RFC3339 ))
357357}
358358
359+ func TestInstallFromReplicatedApp (t * testing.T ) {
360+ t .Parallel ()
361+ tc := cluster .NewTestCluster (& cluster.Input {
362+ T : t ,
363+ Nodes : 1 ,
364+ Image : "ubuntu/jammy" ,
365+ })
366+ defer tc .Destroy ()
367+ t .Logf ("%s: downloading embedded-cluster on node 0" , time .Now ().Format (time .RFC3339 ))
368+ line := []string {"vandoor-prepare.sh" , os .Getenv ("SHORT_SHA" )}
369+ if stdout , stderr , err := RunCommandOnNode (t , tc , 0 , line ); err != nil {
370+ t .Log ("stdout:" , stdout )
371+ t .Log ("stderr:" , stderr )
372+ t .Fatalf ("fail to download embedded-cluster on node 0 %s: %v" , tc .Nodes [0 ], err )
373+ }
374+
375+ t .Logf ("%s: installing embedded-cluster on node 0" , time .Now ().Format (time .RFC3339 ))
376+ line = []string {"single-node-install.sh" }
377+ if stdout , stderr , err := RunCommandOnNode (t , tc , 0 , line ); err != nil {
378+ t .Log ("install stdout:" , stdout )
379+ t .Log ("install stderr:" , stderr )
380+ t .Fatalf ("fail to install embedded-cluster on node %s: %v" , tc .Nodes [0 ], err )
381+ }
382+
383+ t .Logf ("%s: checking installation state" , time .Now ().Format (time .RFC3339 ))
384+ line = []string {"check-installation-state.sh" }
385+ stdout , stderr , err := RunCommandOnNode (t , tc , 0 , line )
386+ if err != nil {
387+ t .Log ("stdout:" , stdout )
388+ t .Log ("stderr:" , stderr )
389+ t .Fatalf ("fail to check installation state: %v" , err )
390+ }
391+
392+ t .Logf ("%s: checking installation state after upgrade" , time .Now ().Format (time .RFC3339 ))
393+ line = []string {"check-postupgrade-state.sh" , os .Getenv ("SHORT_SHA" )}
394+ stdout , stderr , err = RunCommandOnNode (t , tc , 0 , line )
395+ if err != nil {
396+ t .Log ("stdout:" , stdout )
397+ t .Log ("stderr:" , stderr )
398+ t .Fatalf ("fail to check postupgrade state: %v" , err )
399+ }
400+
401+ t .Logf ("%s: test complete" , time .Now ().Format (time .RFC3339 ))
402+ }
403+
359404func runPuppeteerAppStatusCheck (t * testing.T , node int , tc * cluster.Output ) {
360405 t .Logf ("%s: installing puppeteer on node %d" , time .Now ().Format (time .RFC3339 ), node )
361406 line := []string {"install-puppeteer.sh" }
0 commit comments