Developer-Dashboard
view release on metacpan or search on metacpan
t/13-integration-assets.t view on Meta::CPAN
open my $docker_fh, '<', 'integration/blank-env/Dockerfile' or die $!;
my $dockerfile = do { local $/; <$docker_fh> };
close $docker_fh;
like( $dockerfile, qr/\bchromium\b/, 'integration Dockerfile installs Chromium for browser verification' );
like( $dockerfile, qr/\blibexpat1-dev\b/, 'integration Dockerfile installs libexpat1-dev for XML::Parser during host-built tarball installs' );
like( $dockerfile, qr/\blibssl-dev\b/, 'integration Dockerfile installs libssl-dev for Net::SSLeay during host-built tarball installs' );
like( $dockerfile, qr/\bpkg-config\b/, 'integration Dockerfile installs pkg-config for native CPAN prerequisite discovery' );
like( $dockerfile, qr/\bzlib1g-dev\b/, 'integration Dockerfile installs zlib1g-dev for native CPAN prerequisite builds' );
unlike( $dockerfile, qr/\bDist::Zilla\b/, 'integration Dockerfile no longer installs Dist::Zilla because host builds the tarball' );
open my $compose_fh, '<', 'integration/blank-env/docker-compose.yml' or die $!;
my $compose = do { local $/; <$compose_fh> };
close $compose_fh;
like( $compose, qr/DASHBOARD_TARBALL/, 'integration compose file mounts the host-built tarball into the container' );
unlike( $compose, qr/\.\.\/\.\.:\/workspace/, 'integration compose file does not mount the repo source into the container' );
open my $host_fh, '<', 'integration/blank-env/run-host-integration.sh' or die $!;
my $host = do { local $/; <$host_fh> };
close $host_fh;
like( $host, qr/\.perl5/, 'host launcher bootstraps a local perl toolchain when needed' );
like( $host, qr/rm -rf Developer-Dashboard-\* Developer-Dashboard-\*\.tar\.gz/, 'host launcher removes old release build directories and tarballs before building a new one' );
like( $host, qr/LOCAL_DZIL.*build/s, 'host launcher builds the tarball on the host with Dist::Zilla' );
like( $host, qr/DASHBOARD_TARBALL/, 'host launcher exports the tarball path for docker compose' );
like( $host, qr/prove -lv t\/44-smart-router-two-stage\.t/, 'host launcher runs the post-build smart-router two-stage guard before blank-environment integration' );
like( $host, qr/run --rm blank-env/, 'host launcher runs the blank-environment integration service' );
unlike( $host, qr/run --build --rm blank-env/, 'host launcher does not rebuild the integration image when using the prebuilt container path' );
like( $host, qr/integration\/blank-env\/Dockerfile/, 'host launcher POD documents the pinned blank-environment Dockerfile path' );
open my $windows_smoke_fh, '<', 'integration/windows/run-strawberry-smoke.ps1' or die $!;
my $windows_smoke = do { local $/; <$windows_smoke_fh> };
close $windows_smoke_fh;
like( $windows_smoke, qr/cpanm/, 'Windows Strawberry smoke script installs the tarball with cpanm' );
like( $windows_smoke, qr/Get-CpanmBin/, 'Windows Strawberry smoke script resolves cpanm explicitly instead of assuming PATH is enough' );
like( $windows_smoke, qr/App::cpanminus/, 'Windows Strawberry smoke script bootstraps App::cpanminus when cpanm is missing' );
like( $windows_smoke, qr/PERL_MM_USE_DEFAULT/, 'Windows Strawberry smoke script forces non-interactive CPAN bootstrap defaults' );
like( $windows_smoke, qr/Set-StrawberryPath/, 'Windows Strawberry smoke script normalizes the Strawberry runtime PATH before invoking wrappers' );
like( $windows_smoke, qr/c\\bin/, 'Windows Strawberry smoke script adds the Strawberry toolchain bin directory to PATH' );
like( $windows_smoke, qr/site\\\\bin/, 'Windows Strawberry smoke script adds Strawberry site bin to PATH so installed scripts resolve after cpanm' );
like( $windows_smoke, qr/Tee-Object -FilePath/, 'Windows Strawberry smoke script captures native command transcripts for failure analysis' );
like( $windows_smoke, qr/--verbose/, 'Windows Strawberry smoke script installs the tarball with verbose cpanm output for debugging' );
like( $windows_smoke, qr/Copy-TarballToLocalTemp/, 'Windows Strawberry smoke script stages the tarball to a local temp path before cpanm install' );
like( $windows_smoke, qr/Copy-Item -Path \$SourceTarball -Destination \$destination -Force/, 'Windows Strawberry smoke script copies shared tarballs off the UNC path before install' );
like( $windows_smoke, qr/\[switch\]\$UseInstallBootstrap/, 'Windows Strawberry smoke script accepts a switch to exercise install.ps1 inside the guest' );
like( $windows_smoke, qr/\[string\]\$BootstrapScript = ""/, 'Windows Strawberry smoke script accepts an explicit install.ps1 path' );
like( $windows_smoke, qr/Invoke-InstallBootstrap/, 'Windows Strawberry smoke script can run the Windows bootstrap installer' );
like( $windows_smoke, qr/DD_INSTALL_CPAN_TARGET/, 'Windows Strawberry smoke script passes the local tarball path into install.ps1 through DD_INSTALL_CPAN_TARGET' );
like( $windows_smoke, qr/DD_INSTALL_BOOTSTRAP_SCRIPT/, 'Windows Strawberry smoke script exposes the install.ps1 path through an environment variable for the streamed bootstrap wrapper' );
like( $windows_smoke, qr/Invoke-Expression/, 'Windows Strawberry smoke script exercises install.ps1 through Invoke-Expression to match the streamed bootstrap path' );
like( $windows_smoke, qr/Assert-FreshPowerShellDashboardBootstrap/, 'Windows Strawberry smoke script verifies a fresh profile-loaded PowerShell session after install.ps1 completes' );
like( $windows_smoke, qr/dd-fresh-session-bootstrap\.ps1/, 'Windows Strawberry smoke script stages the fresh-session PowerShell proof into a temporary ps1 file before launching a normal profile-loaded session' );
like( $windows_smoke, qr/\& powershell\.exe \@\(\s*'-NoLogo',\s*'-File',\s*\$freshSessionScriptPath/s, 'Windows Strawberry smoke script re-enters a normal profile-loaded PowerShell session through a direct powershell.exe invocation without piping...
like( $windows_smoke, qr/DD_FRESH_SESSION_LOG/, 'Windows Strawberry smoke script passes a dedicated fresh-session marker log path into the child PowerShell process' );
like( $windows_smoke, qr/Add-Content -Path \$env:DD_FRESH_SESSION_LOG -Value \$Line/, 'Windows Strawberry smoke script records fresh-session progress markers through a dedicated child-side log file instead of outer stdout capture' );
like( $windows_smoke, qr/DASHBOARD_LOGS_START/, 'Windows Strawberry smoke script prints an explicit dashboard logs marker during the fresh PowerShell bootstrap proof' );
like( $windows_smoke, qr/Get-Command dashboard -ErrorAction Stop/, 'Windows Strawberry smoke script requires a fresh PowerShell session to resolve dashboard through normal command discovery' );
like( $windows_smoke, qr/DASHBOARD_RESTART_START/, 'Windows Strawberry smoke script prints an explicit dashboard restart marker during the fresh PowerShell bootstrap proof' );
like( $windows_smoke, qr/New-SmokeSkillFixture/, 'Windows Strawberry smoke script creates a deterministic local smoke skill for the fresh PowerShell bootstrap proof' );
like( $windows_smoke, qr/requires 'JSON::XS';/, 'Windows Strawberry smoke script gives the fresh-session smoke skill a cpanfile that exercises non-interactive cpanm without external CPAN churn' );
like( $windows_smoke, qr/default>>make\.log/, 'Windows Strawberry smoke script gives the fresh-session smoke skill a Makefile that records target execution' );
like( $windows_smoke, qr/Set-Content -Path \(Join-Path \$fixtureRoot "Makefile"\) -Encoding ASCII/, 'Windows Strawberry smoke script writes the generated fresh-session Makefile without a UTF-8 BOM that would break Windows make' );
like( $windows_smoke, qr/DASHBOARD_SKILL_INSTALL_START/, 'Windows Strawberry smoke script prints an explicit smoke skill install marker during the fresh PowerShell bootstrap proof' );
like( $windows_smoke, qr/dashboard restart/, 'Windows Strawberry smoke script exercises dashboard restart in the fresh PowerShell session' );
like( $windows_smoke, qr/dashboard skills install \$env:DD_SMOKE_SKILL_SOURCE/, 'Windows Strawberry smoke script exercises local smoke skill installation in the fresh PowerShell session' );
like( $windows_smoke, qr/dashboard skills install \$env:DD_SMOKE_SKILL_SOURCE 2>&1 \| Out-String/, 'Windows Strawberry smoke script captures the fresh-session smoke skill install transcript before surfacing any failure' );
like( $windows_smoke, qr/dashboard restart failed with exit code \$LASTEXITCODE/, 'Windows Strawberry smoke script treats dashboard restart failures as fatal during the fresh PowerShell bootstrap proof' );
like( $windows_smoke, qr/dashboard skills install smoke skill failed with exit code \$LASTEXITCODE/, 'Windows Strawberry smoke script treats smoke skill install failures as fatal during the fresh PowerShell bootstrap proof' );
like( $windows_smoke, qr/\[switch\]\$SkipCpanmTests/, 'Windows Strawberry smoke script accepts a switch to skip upstream cpanm dependency tests on Windows' );
like( $windows_smoke, qr/--notest/, 'Windows Strawberry smoke script can install with cpanm --notest when Windows dependency tests are intentionally skipped' );
like( $windows_smoke, qr/Get-CommandExecutablePath/, 'Windows Strawberry smoke script centralizes command-object to executable-path resolution' );
like( $windows_smoke, qr/Get-WhereExecutablePath/, 'Windows Strawberry smoke script falls back to where.exe for Windows-native executable path resolution' );
like( $windows_smoke, qr/foreach \(\$propertyName in \@\("Source", "Path", "Definition"\)\)/, 'Windows Strawberry smoke script falls back across Source, Path, and Definition when resolving executable paths' );
like( $windows_smoke, qr/where\.exe/, 'Windows Strawberry smoke script uses where.exe when PowerShell command metadata does not expose a real path' );
like( $windows_smoke, qr/\[AllowEmptyString\(\)\]\[string\]\$ResolvedPerl = ""/, 'Windows Strawberry smoke script allows an empty ResolvedPerl parameter so the fallback resolver can run inside Set-StrawberryPath' );
like( $windows_smoke, qr/function Invoke-AssertContains \{\s+param\(\s+\[Parameter\(Mandatory = \$true\)\]\s+\[AllowEmptyString\(\)\]\s+\[string\]\$Text/s, 'Windows Strawberry smoke script allows empty assertion input text so the harness reports ...
like( $windows_smoke, qr/function Invoke-AssertNotContains \{\s+param\(\s+\[Parameter\(Mandatory = \$true\)\]\s+\[AllowEmptyString\(\)\]\s+\[string\]\$Text/s, 'Windows Strawberry smoke script allows empty negative-assertion input text so blank ou...
like( $windows_smoke, qr/\[string\]::IsNullOrWhiteSpace\(\$ResolvedPerl\)/, 'Windows Strawberry smoke script guards against blank Perl path resolution before calling Test-Path' );
like( $windows_smoke, qr/Unable to resolve a filesystem path for Perl interpreter/, 'Windows Strawberry smoke script throws an explicit error when a Perl command name cannot be resolved to a filesystem path' );
like( $windows_smoke, qr/Write-PhaseStatus/, 'Windows Strawberry smoke script reports phase-level progress for long Windows runs' );
like( $windows_smoke, qr/Write-Host "PHASE: \$Phase"/, 'Windows Strawberry smoke script also emits each long-running phase to stdout for live operator visibility' );
like( $windows_smoke, qr/Copy-StatusArtifact/, 'Windows Strawberry smoke script copies diagnostic artifacts back to the shared status root' );
like( $windows_smoke, qr/cpanm-install\.log/, 'Windows Strawberry smoke script exports the cpanm transcript into the shared status root' );
like( $windows_smoke, qr/\$cpanmLog = Join-Path \$StatusRoot "cpanm-install\.log"/, 'Windows Strawberry smoke script writes the cpanm transcript directly into the shared status root when available' );
like( $windows_smoke, qr/Disable-WindowsFirewallForSmoke/, 'Windows Strawberry smoke script disables the disposable guest firewall before CPAN listener tests run' );
like( $windows_smoke, qr/Set-NetFirewallProfile|netsh\.exe/, 'Windows Strawberry smoke script uses native Windows firewall controls for the smoke guest' );
unlike( $windows_smoke, qr/\&\s+\$cmd\.Source/, 'Windows Strawberry smoke script does not incorrectly invoke a cmdlet via its module Source field' );
unlike( $windows_smoke, qr/Set-NetFirewallProfile failed with exit code/, 'Windows Strawberry smoke script does not assume cmdlets populate LASTEXITCODE' );
like( $windows_smoke, qr/\$savedErrorActionPreference/, 'Windows Strawberry smoke script saves the caller error preference before native commands' );
like( $windows_smoke, qr/\$ErrorActionPreference = 'Continue'/, 'Windows Strawberry smoke script avoids PowerShell terminating on native stderr before exit-code checks' );
like( $windows_smoke, qr/dashboard shell ps/, 'Windows Strawberry smoke script verifies PowerShell shell bootstrap output' );
like( $windows_smoke, qr/dashboard collector run/, 'Windows Strawberry smoke script exercises collector command execution' );
like( $windows_smoke, qr/Invoke-WebRequest/, 'Windows Strawberry smoke script verifies browser-facing HTTP routes with PowerShell web requests' );
like( $windows_smoke, qr/saved Ajax route:/, 'Windows Strawberry smoke script prints the resolved saved Ajax route during the guest smoke for route-shape diagnostics' );
like( $windows_smoke, qr/\/ajax\/hello\.pl\?type=text/, 'Windows Strawberry smoke script replays the deterministic saved Ajax route defined by the Windows smoke fixture' );
like( $windows_smoke, qr/Set-Content -Path \(Join-Path \$ajaxRoot "hello\.pl"\) -Value 'print "ajax-ok";'/, 'Windows Strawberry smoke script provisions the saved Ajax fixture file directly under dashboards/ajax before replaying it' );
like( $windows_smoke, qr/saved Ajax body:/, 'Windows Strawberry smoke script prints the raw saved Ajax response body during the guest smoke when asserting the saved Ajax handler output' );
like( $windows_smoke, qr/msedge\.exe|chrome\.exe/, 'Windows Strawberry smoke script looks for a Windows browser binary for DOM smoke checks' );
like( $windows_smoke, qr/Browser dump-dom timed out after 20 seconds/, 'Windows Strawberry smoke script fails explicitly when the optional headless browser DOM dump stalls' );
like( $windows_smoke, qr/\[System\.Diagnostics\.ProcessStartInfo\]::new\(\)/, 'Windows Strawberry smoke script launches the optional headless browser dump through an explicit .NET process start info object' );
like( $windows_smoke, qr/RedirectStandardOutput = \$true/, 'Windows Strawberry smoke script captures browser DOM stdout directly through the .NET process runner' );
like( $windows_smoke, qr/RedirectStandardError = \$true/, 'Windows Strawberry smoke script captures browser DOM stderr directly through the .NET process runner' );
like( $windows_smoke, qr/function Quote-WindowsProcessArgument/, 'Windows Strawberry smoke script defines an explicit native Windows argument quoter for the browser DOM runner' );
like( $windows_smoke, qr/\$processStartInfo\.Arguments =/, 'Windows Strawberry smoke script writes the browser command line through ProcessStartInfo.Arguments on older Windows PowerShell runtimes' );
like( $windows_smoke, qr/--no-first-run/, 'Windows Strawberry smoke script disables first-run browser prompts during the optional DOM dump' );
like( $windows_smoke, qr/--disable-background-networking/, 'Windows Strawberry smoke script disables background browser networking during the optional DOM dump' );
like( $windows_smoke, qr/'--dump-dom',\s*\$Url/s, 'Windows Strawberry smoke script passes the target URL to Chromium dump-dom as a separate trailing argument so Edge actually navigates to the requested page' );
like( $windows_smoke, qr/WaitForExit\(20000\)/, 'Windows Strawberry smoke script caps the optional headless browser DOM dump at twenty seconds' );
like( $windows_smoke, qr/__END__/, 'Windows Strawberry smoke script carries POD trailer' );
unlike( $windows_smoke, qr/Developer-Dashboard-1\.\d+\.tar\.gz/, 'Windows Strawberry smoke script POD avoids hard-coded release tarball versions' );
unlike( $windows_smoke, qr/\&\s+\$Command\[0\]\s+\@Command\[/, 'Windows Strawberry smoke script avoids invalid inline PowerShell splatting expressions' );
like( $windows_smoke, qr/\$command_args\s*=\s*@\(\)/, 'Windows Strawberry smoke script stages command arguments into a separate splat array' );
open my $qemu_fh, '<', 'integration/windows/run-qemu-windows-smoke.sh' or die $!;
my $qemu = do { local $/; <$qemu_fh> };
close $qemu_fh;
like( $qemu, qr/qemu-system-x86_64/, 'Windows QEMU launcher boots a Windows VM with qemu-system-x86_64' );
like( $qemu, qr/scp|ssh/, 'Windows QEMU launcher copies the tarball and smoke script into the guest over SSH' );
like( $qemu, qr/run-strawberry-smoke\.ps1/, 'Windows QEMU launcher runs the Strawberry smoke script inside the guest' );
like( $qemu, qr/cp "\$ROOT_DIR\/install\.ps1"/, 'Windows QEMU launcher stages install.ps1 into the guest bundle' );
like( $qemu, qr/'-StatusRoot', \\\$shared/, 'Windows QEMU launcher passes the shared status root into the Windows smoke script' );
like( $qemu, qr/Dockur Windows container disappeared before reporting success/, 'Windows QEMU launcher fails fast when the Dockur container vanishes before reporting a result' );
( run in 0.606 second using v1.01-cache-2.11-cpan-c966e8aa7e8 )