Fix Docker deployment inputs
Include all addon workspaces and vendored dependencies in image builds, and expose deploy time plus commit metadata on the home page. Amp-Thread-ID: https://ampcode.com/threads/T-01a033d4-0e44-708e-af0e-6166283416ff Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
@@ -68,6 +68,25 @@ func TestHealth(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestHomeLogsDeploymentMetadata(t *testing.T) {
|
||||
t.Setenv("YAWN_DEPLOYED_AT", "2026-08-24T18:30:00Z")
|
||||
t.Setenv("YAWN_DEPLOY_COMMIT_MESSAGE", "Fix Docker deployment")
|
||||
request := httptest.NewRequest(http.MethodGet, "/", nil)
|
||||
response := httptest.NewRecorder()
|
||||
testApplication(t).routes().ServeHTTP(response, request)
|
||||
if response.Code != http.StatusOK {
|
||||
t.Fatalf("status = %d", response.Code)
|
||||
}
|
||||
for _, expected := range []string{
|
||||
`console.log("Yawn deployed at 25 August 2026, 12:00:00 AM IST\nLatest commit: Fix Docker deployment")`,
|
||||
"<title>Yawn",
|
||||
} {
|
||||
if !bytes.Contains(response.Body.Bytes(), []byte(expected)) {
|
||||
t.Fatalf("home page does not contain %q", expected)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestPlaygroundStoreMigratesLoadouts(t *testing.T) {
|
||||
path := filepath.Join(t.TempDir(), "legacy.db")
|
||||
database, err := sql.Open("sqlite3", path)
|
||||
|
||||
Reference in New Issue
Block a user