@@ -44,29 +44,29 @@ func TestStableToUnstable(t *testing.T) {
4444
4545}
4646
47- // func TestUnstableToStable(t *testing.T) {
48- // tagAppCli := FetchDebPackage(t, "arduino-app-cli", "latest", *arch)
49- // FetchDebPackage(t, "arduino-router", "latest", *arch)
50- // minorTag := minorTag(t, tagAppCli)
51- // moveDeb(t, "build/stable", "build/", "arduino-app-cli", tagAppCli, *arch)
52-
53- // fmt.Printf("Updating from unstable version %s to stable version %s \n", minorTag, tagAppCli)
54- // fmt.Printf("Building local deb version %s \n", minorTag)
55- // buildDebVersion(t, minorTag, *arch)
56- // moveDeb(t, "build/", "build/stable", "arduino-app-cli", tagAppCli, *arch)
57-
58- // fmt.Println("**** BUILD docker image *****")
59- // buildDockerImage(t, "test.Dockerfile", "test-apt-update")
60- // fmt.Println("**** RUN docker image *****")
61- // runDockerCommand(t, "test-apt-update")
62- // preUpdateVersion := runDockerSystemVersion(t, "apt-test-update")
63- // runDockerSystemUpdate(t, "apt-test-update")
64- // postUpdateVersion := runDockerSystemVersion(t, "apt-test-update")
65- // runDockerCleanUp(t, "apt-test-update")
66- // require.Equal(t, preUpdateVersion, "Arduino App CLI "+tagAppCli)
67- // require.Equal(t, postUpdateVersion, "Arduino App CLI "+minorTag)
68-
69- // }
47+ func TestUnstableToStable (t * testing.T ) {
48+ tagAppCli := FetchDebPackage (t , "arduino-app-cli" , "latest" , * arch )
49+ FetchDebPackage (t , "arduino-router" , "latest" , * arch )
50+ minorTag := minorTag (t , tagAppCli )
51+ moveDeb (t , "build/stable" , "build/" , "arduino-app-cli" , tagAppCli , * arch )
52+
53+ fmt .Printf ("Updating from unstable version %s to stable version %s \n " , minorTag , tagAppCli )
54+ fmt .Printf ("Building local deb version %s \n " , minorTag )
55+ buildDebVersion (t , minorTag , * arch )
56+ moveDeb (t , "build/" , "build/stable" , "arduino-app-cli" , tagAppCli , * arch )
57+
58+ fmt .Println ("**** BUILD docker image *****" )
59+ buildDockerImage (t , "test.Dockerfile" , "test-apt-update" , * arch )
60+ fmt .Println ("**** RUN docker image *****" )
61+ runDockerCommand (t , "test-apt-update" )
62+ preUpdateVersion := runDockerSystemVersion (t , "apt-test-update" )
63+ runDockerSystemUpdate (t , "apt-test-update" )
64+ postUpdateVersion := runDockerSystemVersion (t , "apt-test-update" )
65+ runDockerCleanUp (t , "apt-test-update" )
66+ require .Equal (t , preUpdateVersion , "Arduino App CLI " + tagAppCli + " \n " )
67+ require .Equal (t , postUpdateVersion , "Arduino App CLI " + minorTag + " \n " )
68+
69+ }
7070
7171func FetchDebPackage (t * testing.T , repo , version , arch string ) string {
7272 t .Helper ()
0 commit comments