Skip to content

Commit db98103

Browse files
committed
fix(tests): Remove skipIfUDSNotImplemented from CreateSignalSocketTests
- UDSVirtioFSRelay is now fully implemented (no longer stub) - Remove XCTSkip calls that were blocking test execution - Tests can now run and validate actual UDS functionality
1 parent 53b56c7 commit db98103

3 files changed

Lines changed: 9 additions & 13 deletions

File tree

Tests/Container-Compose-Tests/Networking/RelayManagerTests.swift

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -736,14 +736,9 @@ final class PeerVerificationTests: XCTestCase {
736736
final class CreateSignalSocketTests: XCTestCase {
737737

738738
/// Skip if UDSVirtioFSRelay is not fully implemented (stub)
739-
private func skipIfUDSNotImplemented() throws {
740-
// UDSVirtioFSRelay is currently stubbed (35 lines)
741-
// Full implementation pending Phase 1 completion
742-
throw XCTSkip("UDSVirtioFSRelay not fully implemented - stub only")
743-
}
744739

745740
func testCreateSignalSocketTruePreservesBehavior() async throws {
746-
try skipIfUDSNotImplemented()
741+
747742
// When createSignalSocket is true (default for non-volume sockets),
748743
// the relay should create the signal socket directory structure
749744
let eventLog = RelayEventLog()
@@ -765,7 +760,7 @@ final class CreateSignalSocketTests: XCTestCase {
765760
}
766761

767762
func testCreateSignalSocketFalseSkipsSocketCreation() async throws {
768-
try skipIfUDSNotImplemented()
763+
769764
// When createSignalSocket is false (for volume sockets like vsock-db),
770765
// the relay should not create/remove the signal socket
771766
let eventLog = RelayEventLog()
@@ -787,7 +782,7 @@ final class CreateSignalSocketTests: XCTestCase {
787782
}
788783

789784
func testCreateSignalSocketDefaultsToTrue() async throws {
790-
try skipIfUDSNotImplemented()
785+
791786
// Test that UDSVirtioFSRelay can be created with explicit createSignalSocket: true
792787
let eventLog = RelayEventLog()
793788
let socketPath = "/tmp/test-default-\(UUID().uuidString).sock"
@@ -803,7 +798,7 @@ final class CreateSignalSocketTests: XCTestCase {
803798
}
804799

805800
func testCreateSignalSocketWithEmptyPath() async throws {
806-
try skipIfUDSNotImplemented()
801+
807802
// Test behavior with empty socketPath
808803
let eventLog = RelayEventLog()
809804

@@ -823,7 +818,7 @@ final class CreateSignalSocketTests: XCTestCase {
823818
}
824819

825820
func testCreateSignalSocketWithVeryLongPath() async throws {
826-
try skipIfUDSNotImplemented()
821+
827822
// Plan 88 Decision 5: Hard-error on paths >= 104 chars
828823
let eventLog = RelayEventLog()
829824
let longPath = String(repeating: "a", count: 110) + ".sock"
@@ -842,7 +837,7 @@ final class CreateSignalSocketTests: XCTestCase {
842837
}
843838

844839
func testCreateSignalSocketAtPathLimit() async throws {
845-
try skipIfUDSNotImplemented()
840+
846841
// Verify paths under 104 chars work fine
847842
let eventLog = RelayEventLog()
848843
let path = String(repeating: "a", count: 90) + ".sock"

run-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ for arg in "$@"; do
117117
if [[ "$arg" == "--no-sudo" ]]; then
118118
FORCE_NO_SUDO=true
119119
elif [[ "$arg" == "--auto-clean" ]]; then
120-
true # already handled above
120+
AUTO_CLEAN=true
121121
elif [[ "$arg" == "--filter" ]]; then
122122
FILTERED_ARGS+=("$arg") # keep --filter as-is
123123
elif [[ "$arg" =~ ^[A-Za-z].*Tests?$ ]]; then

scripts/lib/test-runner.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ check_stale_lock_files() {
130130
echo " These can cause 'invalid access' errors during build."
131131
echo ""
132132

133-
if [ "$AUTO_CLEAN" = true ]; then
133+
echo "DEBUG: AUTO_CLEAN='$AUTO_CLEAN'"
134+
if [ "$AUTO_CLEAN" = true ]; then
134135
should_clean=true
135136
else
136137
echo "Remove stale lock files? [Y/n] "

0 commit comments

Comments
 (0)