Files
aego/tools/release/deploy_test.go
sanspie 5eb1832907
ci-platforms / darwin amd64 smoke (push) Skipped
ci / build (amd64, linux, ubuntu-24.04) (push) Failing after 15m28s
ci / release (push) Skipped
ci-platforms / windows amd64 smoke (push) Skipped
ci-platforms / darwin arm64 smoke (push) Skipped
ci / checks (push) Successful in 7m47s
Complete Stage 12 for v0.12.0
2026-11-05 11:46:53 +03:00

34 lines
1.1 KiB
Go

package release
import (
"os"
"strings"
"testing"
)
func TestSiteImageRequiresPinnedShaderValidator(t *testing.T) {
dockerfile, err := os.ReadFile("../../deploy/Dockerfile")
if err != nil {
t.Fatal(err)
}
version, err := os.ReadFile("../glslang.version")
if err != nil {
t.Fatal(err)
}
build := string(dockerfile)
pinned := "glslang-tools=" + strings.TrimSpace(string(version)) + "-"
if !strings.Contains(build, pinned) {
t.Fatalf("site image must install the pinned reference validator (%s)", pinned)
}
check := strings.Index(build, "bash tools/check-glslang.sh")
export := strings.Index(build, "make site-headless")
if check < 0 || export < 0 || check > export {
t.Fatal("site image must verify the pinned validator before exporting the site")
}
copyInstallers := strings.Index(build, "COPY tools/release/install.sh tools/release/install.ps1 site/")
makeReadable := strings.Index(build, "RUN chmod 0644 site/install.sh site/install.ps1")
if copyInstallers < 0 || makeReadable < copyInstallers {
t.Fatal("site image must make the installer scripts publicly readable")
}
}