CI / Build and test (push) Failing after 3m1s
CI / PostgreSQL 16 integration (push) Skipped
CI / PostgreSQL 17 integration (push) Skipped
CI / Docker image (push) Skipped
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 10s
Release / Build, test and publish (push) Successful in 15m31s
Release / Server image (push) Successful in 1m13s
Convert photos already in the archive to JPEG, TIFF-16 or Linear DNG, from the panel's Library and the desktop's Archive and Library. Each run asks Replace (same frames, originals to the trash, recoverable) or New sequence. A dry run lists what converts, what is skipped and why, size before and after, and free space; the job converts exactly the confirmed photos, resumes, and commits all or nothing per sequence. A conversion never changes what Chronos reads from a photo. Replaced originals are erased only on the archive's own word that their conversion is gone. Desktop TIFFs that WIC showed black or as noise now go to the managed reader; the Edit picker no longer spins a core. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
33 lines
1.4 KiB
C#
33 lines
1.4 KiB
C#
using Chronos.Core.Windows.Devices;
|
|
using Chronos.Testing;
|
|
|
|
namespace Chronos.Core.Windows.Tests.Devices;
|
|
|
|
/// <summary>
|
|
/// The free space of a folder's volume as a conversion checks it on the desktop (owner review 2, R7): a network share's too,
|
|
/// which <see cref="DriveInfo"/> cannot measure. Apart from <see cref="VolumeTests"/>, which enumerate every volume.
|
|
/// </summary>
|
|
public sealed class FreeSpaceTests(TestContext context)
|
|
{
|
|
[Test]
|
|
[WindowsOnly]
|
|
public void AFolderIsMeasuredOnItsVolumeAndAMissingOneIsNot()
|
|
{
|
|
var folder = context.CreateTempDirectory("free");
|
|
Assert.Greater(Assert.NotNull(VolumeInfo.FreeBytesAt(folder)), 0);
|
|
Assert.Greater(Assert.NotNull(VolumeInfo.FreeBytesAt(folder + Path.DirectorySeparatorChar)), 0);
|
|
Assert.Null(VolumeInfo.FreeBytesAt(Path.Combine(folder, "missing", "deeper")));
|
|
}
|
|
|
|
[Test]
|
|
[WindowsOnly]
|
|
public void AFolderOnAShareIsMeasuredWhereTheDriveCannotBe()
|
|
{
|
|
var folder = Path.GetFullPath(context.CreateTempDirectory("share"));
|
|
var share = $@"\\localhost\{char.ToLowerInvariant(folder[0])}$" + folder[2..];
|
|
if (!Directory.Exists(share)) TestContext.Skip("This PC has no administrative share for the test folder.");
|
|
Assert.Throws<ArgumentException>(() => new DriveInfo(Path.GetPathRoot(share)!));
|
|
Assert.Greater(Assert.NotNull(VolumeInfo.FreeBytesAt(share)), 0);
|
|
}
|
|
}
|