test: remove tests that do not test behavior and strengthen weak ones

- Remove tests that only check markup, CSS, static text, wire:key strings,
  framework behavior, copied app logic, or expect(true)
- Replace source-grep and Reflection checks of security fixes with tests
  that run the real code (shell quoting, locked properties, 403 checks,
  webhook fork trust, log redaction, Sentinel token cleanup)
- Assert response bodies and unchanged data on API error paths
- Run the Traefik version job through handle() instead of private methods
- Update stale tests for scheduled task props, the default Postgres image,
  and the disabled transfer link of unvalidated servers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2026-11-09 08:47:56 +01:00
co-authored by Claude Opus 5.5
parent de75bbe004
commit a70e856882
146 changed files with 1727 additions and 4635 deletions
+4 -11
View File
@@ -12,18 +12,14 @@ test('parseDockerVolumeString correctly handles Windows paths with drive letters
test('validateVolumeStringForInjection correctly handles Windows paths via parseDockerVolumeString', function () {
$windowsVolume = 'C:\\Users\\Data:/app/data';
// Should not throw an exception
validateVolumeStringForInjection($windowsVolume);
// If we get here, the test passed
expect(true)->toBeTrue();
expect(fn () => validateVolumeStringForInjection($windowsVolume))->not->toThrow(Exception::class);
});
test('validateVolumeStringForInjection rejects malicious Windows-like paths', function () {
$maliciousVolume = 'C:\\host\\`whoami`:/container';
expect(fn () => validateVolumeStringForInjection($maliciousVolume))
->toThrow(\Exception::class);
->toThrow(Exception::class);
});
test('validateDockerComposeForInjection handles Windows paths in compose files', function () {
@@ -35,10 +31,7 @@ services:
- C:\Users\Data:/app/data
YAML;
// Should not throw an exception
validateDockerComposeForInjection($dockerComposeYaml);
expect(true)->toBeTrue();
expect(fn () => validateDockerComposeForInjection($dockerComposeYaml))->not->toThrow(Exception::class);
});
test('validateDockerComposeForInjection rejects Windows paths with injection', function () {
@@ -51,7 +44,7 @@ services:
YAML;
expect(fn () => validateDockerComposeForInjection($dockerComposeYaml))
->toThrow(\Exception::class);
->toThrow(Exception::class);
});
test('Windows paths with complex paths and spaces are handled correctly', function () {