diff --git a/_ertgo b/_ertgo index 211aa31..446860f 160000 --- a/_ertgo +++ b/_ertgo @@ -1 +1 @@ -Subproject commit 211aa319e9c399e7ea0d59d9ade1386587ded4e9 +Subproject commit 446860fe00717d4e7e99759ba07338295c4994af diff --git a/ego/cmd/newer-go-ver-test/go.mod b/ego/cmd/newer-go-ver-test/go.mod new file mode 100644 index 0000000..8994947 --- /dev/null +++ b/ego/cmd/newer-go-ver-test/go.mod @@ -0,0 +1,7 @@ +module example.com/newer-go-ver-test + +go 1.99 + +replace example.com/testmod => ./testmod + +require example.com/testmod v0.0.0-00010101000000-000000000000 diff --git a/ego/cmd/newer-go-ver-test/main.go b/ego/cmd/newer-go-ver-test/main.go new file mode 100644 index 0000000..742c2e0 --- /dev/null +++ b/ego/cmd/newer-go-ver-test/main.go @@ -0,0 +1,7 @@ +package main + +import "example.com/testmod" + +func main() { + testmod.Hello() +} diff --git a/ego/cmd/newer-go-ver-test/testmod/go.mod b/ego/cmd/newer-go-ver-test/testmod/go.mod new file mode 100644 index 0000000..7b8bf8f --- /dev/null +++ b/ego/cmd/newer-go-ver-test/testmod/go.mod @@ -0,0 +1,3 @@ +module example.com/testmod + +go 1.98 diff --git a/ego/cmd/newer-go-ver-test/testmod/testmod.go b/ego/cmd/newer-go-ver-test/testmod/testmod.go new file mode 100644 index 0000000..7081dd2 --- /dev/null +++ b/ego/cmd/newer-go-ver-test/testmod/testmod.go @@ -0,0 +1,7 @@ +package testmod + +import "fmt" + +func Hello() { + fmt.Println("hello from testmod") +} diff --git a/src/integration_test.sh b/src/integration_test.sh index 6da186d..f5b49bf 100755 --- a/src/integration_test.sh +++ b/src/integration_test.sh @@ -98,3 +98,11 @@ run ego sign enclave2.json keyid2=$(ego run sealkeyid-test) echo 'test keyid1 = keyid2' test "$keyid1" = "$keyid2" + +# Test building module with newer go version +mkdir "$tPath/newer-go-ver-test" +cd "$egoPath/ego/cmd/newer-go-ver-test" +run ego-go build -o "$tPath/newer-go-ver-test" +cd "$tPath/newer-go-ver-test" +run ego sign newer-go-ver-test +run ego run newer-go-ver-test