feat: add fnOS packaging, storage workflows and release pipeline
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using dy.net.model.entity;
|
||||
using dy.net.storage;
|
||||
|
||||
namespace dy.net.Tests;
|
||||
|
||||
public class StorageConfigurationFingerprintTests
|
||||
{
|
||||
[Fact]
|
||||
public void Create_TracksTargetButIgnoresCredentialCiphertextRotation()
|
||||
{
|
||||
var settings = Settings();
|
||||
var original = StorageConfigurationFingerprint.Create(settings);
|
||||
|
||||
settings.ProtectedPassword = "new-randomized-ciphertext";
|
||||
settings.AllowInvalidCertificate = true;
|
||||
|
||||
Assert.Equal(original, StorageConfigurationFingerprint.Create(settings));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("https://example.test/other-dav", "/media", "account")]
|
||||
[InlineData("https://example.test/dav", "/other-media", "account")]
|
||||
[InlineData("https://example.test/dav", "/media", "other-account")]
|
||||
public void Create_ChangesWhenRemoteTargetChanges(string endpoint, string basePath, string userName)
|
||||
{
|
||||
var original = StorageConfigurationFingerprint.Create(Settings());
|
||||
var changed = Settings();
|
||||
changed.Endpoint = endpoint;
|
||||
changed.BasePath = basePath;
|
||||
changed.UserName = userName;
|
||||
|
||||
Assert.NotEqual(original, StorageConfigurationFingerprint.Create(changed));
|
||||
}
|
||||
|
||||
private static WebDavSettings Settings() => new()
|
||||
{
|
||||
Endpoint = "https://example.test/dav/",
|
||||
BasePath = "/media/",
|
||||
UserName = "account",
|
||||
ProtectedPassword = "ciphertext"
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user