Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
runtime arch
  • Loading branch information
giulio93 committed Nov 14, 2025
commit 9e336ecd076bca56a1c797f6e253f68de6d2e723
14 changes: 7 additions & 7 deletions internal/e2e/updatetest/update_test.go
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package updatetest

import (
"flag"
"fmt"
"os"
"runtime"
"testing"
"time"

"github.com/stretchr/testify/require"
)

var arch = flag.String("arch", "amd64", "target architecture")
var arch = runtime.GOARCH

const dockerFile = "test.Dockerfile"
const daemonHost = "127.0.0.1:8800"

func TestUpdatePackage(t *testing.T) {
fmt.Printf("***** ARCH %s ***** \n", *arch)
fmt.Printf("***** ARCH %s ***** \n", arch)

t.Run("Stable To Current", func(t *testing.T) {
t.Cleanup(func() { os.RemoveAll("build") })
Expand All @@ -27,11 +27,11 @@ func TestUpdatePackage(t *testing.T) {

fmt.Printf("Updating from stable version %s to unstable version %s \n", tagAppCli, majorTag)
fmt.Printf("Building local deb version %s \n", majorTag)
buildDebVersion(t, "build", majorTag, *arch)
buildDebVersion(t, "build", majorTag, arch)

const dockerImageName = "apt-test-update-image"
fmt.Println("**** BUILD docker image *****")
buildDockerImage(t, dockerFile, dockerImageName, *arch)
buildDockerImage(t, dockerFile, dockerImageName, arch)
//TODO: t cleanup remove docker image

t.Run("CLI Command", func(t *testing.T) {
Expand Down Expand Up @@ -77,12 +77,12 @@ func TestUpdatePackage(t *testing.T) {

fmt.Printf("Updating from unstable version %s to stable version %s \n", minorTag, tagAppCli)
fmt.Printf("Building local deb version %s \n", minorTag)
buildDebVersion(t, "build/stable", minorTag, *arch)
buildDebVersion(t, "build/stable", minorTag, arch)

fmt.Println("**** BUILD docker image *****")
const dockerImageName = "test-apt-update-unstable-image"

buildDockerImage(t, dockerFile, dockerImageName, *arch)
buildDockerImage(t, dockerFile, dockerImageName, arch)
//TODO: t cleanup remove docker image

t.Run("CLI Command", func(t *testing.T) {
Expand Down