Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
"Bash(find:*)",
"Bash(dotnet build:*)",
"Bash(dotnet clean:*)",
"Bash(dotnet restore:*)",
"Bash(dotnet restore:*)",
"Bash(dotnet test:*)",
"Bash(grep:*)",
"Bash(docker compose:*)",
"Bash(docker exec:*)"
"Bash(docker exec:*)",
"Bash(gh run view:*)"
],
"deny": []
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-integration-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ $env:SFTP_TEST_HOST = "localhost"
$env:SFTP_TEST_PORT = "2222"
$env:SFTP_TEST_USER = "testuser"
$env:SFTP_TEST_PASS = "testpass"
$env:SFTP_TEST_ROOT = "/home/testuser/upload"
$env:SFTP_TEST_ROOT = "upload"

$env:FTP_TEST_HOST = "localhost"
$env:FTP_TEST_PORT = "21"
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export SFTP_TEST_HOST=localhost
export SFTP_TEST_PORT=2222
export SFTP_TEST_USER=testuser
export SFTP_TEST_PASS=testpass
export SFTP_TEST_ROOT=/home/testuser/upload
export SFTP_TEST_ROOT=upload

export FTP_TEST_HOST=localhost
export FTP_TEST_PORT=21
Expand Down
48 changes: 24 additions & 24 deletions tests/SharpSync.Tests/Storage/FtpStorageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private FtpStorage CreateStorage() {
useImplicitFtps: _useImplicitFtps);
}

[Fact]
[SkippableFact]
public async Task TestConnectionAsync_ValidCredentials_ReturnsTrue() {
SkipIfIntegrationTestsDisabled();

Expand All @@ -159,7 +159,7 @@ public async Task TestConnectionAsync_ValidCredentials_ReturnsTrue() {
Assert.True(result);
}

[Fact]
[SkippableFact]
public async Task TestConnectionAsync_InvalidCredentials_ReturnsFalse() {
SkipIfIntegrationTestsDisabled();

Expand All @@ -173,7 +173,7 @@ public async Task TestConnectionAsync_InvalidCredentials_ReturnsFalse() {
Assert.False(result);
}

[Fact]
[SkippableFact]
public async Task CreateDirectoryAsync_CreatesDirectory() {
// Arrange
_storage = CreateStorage();
Expand All @@ -187,7 +187,7 @@ public async Task CreateDirectoryAsync_CreatesDirectory() {
Assert.True(exists);
}

[Fact]
[SkippableFact]
public async Task WriteFileAsync_CreatesFile() {
// Arrange
_storage = CreateStorage();
Expand All @@ -203,7 +203,7 @@ public async Task WriteFileAsync_CreatesFile() {
Assert.True(exists);
}

[Fact]
[SkippableFact]
public async Task ReadFileAsync_ReturnsFileContent() {
// Arrange
_storage = CreateStorage();
Expand All @@ -222,7 +222,7 @@ public async Task ReadFileAsync_ReturnsFileContent() {
Assert.Equal(content, result);
}

[Fact]
[SkippableFact]
public async Task ReadFileAsync_NonexistentFile_ThrowsException() {
// Arrange
_storage = CreateStorage();
Expand All @@ -231,7 +231,7 @@ public async Task ReadFileAsync_NonexistentFile_ThrowsException() {
await Assert.ThrowsAsync<FileNotFoundException>(() => _storage.ReadFileAsync("nonexistent.txt"));
}

[Fact]
[SkippableFact]
public async Task ExistsAsync_ExistingFile_ReturnsTrue() {
// Arrange
_storage = CreateStorage();
Expand All @@ -246,7 +246,7 @@ public async Task ExistsAsync_ExistingFile_ReturnsTrue() {
Assert.True(result);
}

[Fact]
[SkippableFact]
public async Task ExistsAsync_NonexistentFile_ReturnsFalse() {
// Arrange
_storage = CreateStorage();
Expand All @@ -258,7 +258,7 @@ public async Task ExistsAsync_NonexistentFile_ReturnsFalse() {
Assert.False(result);
}

[Fact]
[SkippableFact]
public async Task DeleteAsync_ExistingFile_DeletesFile() {
// Arrange
_storage = CreateStorage();
Expand All @@ -274,7 +274,7 @@ public async Task DeleteAsync_ExistingFile_DeletesFile() {
Assert.False(exists);
}

[Fact]
[SkippableFact]
public async Task DeleteAsync_Directory_DeletesDirectory() {
// Arrange
_storage = CreateStorage();
Expand All @@ -289,7 +289,7 @@ public async Task DeleteAsync_Directory_DeletesDirectory() {
Assert.False(exists);
}

[Fact]
[SkippableFact]
public async Task DeleteAsync_DirectoryWithContents_DeletesRecursively() {
// Arrange
_storage = CreateStorage();
Expand All @@ -308,7 +308,7 @@ public async Task DeleteAsync_DirectoryWithContents_DeletesRecursively() {
Assert.False(exists);
}

[Fact]
[SkippableFact]
public async Task MoveAsync_MovesFile() {
// Arrange
_storage = CreateStorage();
Expand Down Expand Up @@ -336,7 +336,7 @@ public async Task MoveAsync_MovesFile() {
Assert.Equal(content, result);
}

[Fact]
[SkippableFact]
public async Task MoveAsync_ToSubdirectory_MovesCorrectly() {
// Arrange
_storage = CreateStorage();
Expand All @@ -358,7 +358,7 @@ public async Task MoveAsync_ToSubdirectory_MovesCorrectly() {
Assert.True(targetExists);
}

[Fact]
[SkippableFact]
public async Task ListItemsAsync_ReturnsItems() {
// Arrange
_storage = CreateStorage();
Expand Down Expand Up @@ -388,7 +388,7 @@ public async Task ListItemsAsync_ReturnsItems() {
Assert.True(directory.IsDirectory);
}

[Fact]
[SkippableFact]
public async Task GetItemAsync_ExistingFile_ReturnsItem() {
// Arrange
_storage = CreateStorage();
Expand All @@ -408,7 +408,7 @@ public async Task GetItemAsync_ExistingFile_ReturnsItem() {
Assert.Equal(content.Length, item.Size);
}

[Fact]
[SkippableFact]
public async Task GetItemAsync_Directory_ReturnsDirectoryItem() {
// Arrange
_storage = CreateStorage();
Expand All @@ -424,7 +424,7 @@ public async Task GetItemAsync_Directory_ReturnsDirectoryItem() {
Assert.True(item.IsDirectory);
}

[Fact]
[SkippableFact]
public async Task GetItemAsync_NonexistentItem_ReturnsNull() {
// Arrange
_storage = CreateStorage();
Expand All @@ -436,7 +436,7 @@ public async Task GetItemAsync_NonexistentItem_ReturnsNull() {
Assert.Null(item);
}

[Fact]
[SkippableFact]
public async Task ComputeHashAsync_ReturnsConsistentHash() {
// Arrange
_storage = CreateStorage();
Expand All @@ -456,7 +456,7 @@ public async Task ComputeHashAsync_ReturnsConsistentHash() {
Assert.Equal(hash1, hash2);
}

[Fact]
[SkippableFact]
public async Task GetStorageInfoAsync_ReturnsStorageInfo() {
// Arrange
_storage = CreateStorage();
Expand All @@ -471,7 +471,7 @@ public async Task GetStorageInfoAsync_ReturnsStorageInfo() {
Assert.Equal(-1, info.UsedSpace);
}

[Fact]
[SkippableFact]
public async Task WriteFileAsync_LargeFile_SupportsProgressReporting() {
// Arrange
_storage = CreateStorage();
Expand All @@ -495,7 +495,7 @@ public async Task WriteFileAsync_LargeFile_SupportsProgressReporting() {
Assert.All(progressEvents, e => Assert.Equal(StorageOperation.Upload, e.Operation));
}

[Fact]
[SkippableFact]
public async Task ReadFileAsync_LargeFile_SupportsProgressReporting() {
// Arrange
_storage = CreateStorage();
Expand Down Expand Up @@ -529,7 +529,7 @@ public async Task ReadFileAsync_LargeFile_SupportsProgressReporting() {
Assert.All(progressEvents, e => Assert.Equal(StorageOperation.Download, e.Operation));
}

[Fact]
[SkippableFact]
public async Task WriteFileAsync_CreatesParentDirectories() {
// Arrange
_storage = CreateStorage();
Expand All @@ -545,7 +545,7 @@ public async Task WriteFileAsync_CreatesParentDirectories() {
Assert.True(exists);
}

[Fact]
[SkippableFact]
public async Task DeleteAsync_NonexistentItem_DoesNotThrow() {
// Arrange
_storage = CreateStorage();
Expand All @@ -554,7 +554,7 @@ public async Task DeleteAsync_NonexistentItem_DoesNotThrow() {
await _storage.DeleteAsync("nonexistent_file.txt");
}

[Fact]
[SkippableFact]
public async Task MoveAsync_NonexistentSource_ThrowsException() {
// Arrange
_storage = CreateStorage();
Expand Down
Loading
Loading