T-iOS-32's acceptance is "builder 测试 + 端到端一次". The builder half was green, but grep for projects/worktree across the whole test tree returned nothing — no test had ever created or removed a real git worktree against a real server. Six tests on a throwaway git fixture: create/remove/prune verified against both the filesystem and git's own `worktree list --porcelain` + .git/worktrees/, and asserting the values the SERVER derives rather than echoing our input (branch feature/e2e-worktree becomes directory feature-e2e-worktree; the raw branch name must never appear in the path). Includes a differential leg for the guarded-route rule — the same request without Origin is 403 with zero side effects, and with it is 200 — which needs raw URLSession, since APIClient structurally cannot emit an Origin-less guarded request. GET /sessions gets its own HOME-isolated server: history.ts reads os.homedir()/.claude/projects, so against the shared harness the assertions would land on the developer's real Claude history, and in CI the directory is absent so it degrades to [] and proves nothing. Integration tests 26 -> 32, independently re-run.
44 lines
2.0 KiB
Swift
44 lines
2.0 KiB
Swift
// swift-tools-version: 6.0
|
|
// T-iOS-16 integration-CI package: Swift Testing suites against the REAL Node
|
|
// server (self-bootstrapped by ServerHarness — spawns `tsx src/server.ts` on an
|
|
// ephemeral loopback port; see ServerHarness.swift for the run modes).
|
|
// Flat layout (plan §2): test sources live directly in ios/IntegrationTests/.
|
|
// `scripts/` holds the per-package coverage gate used by .github/workflows/ios.yml.
|
|
//
|
|
// F3 · why this package depends on FOUR client packages while every other
|
|
// package depends strictly downward: the access-token policy is duplicated in
|
|
// three modules (SessionCore.AuthCookie, HostRegistry.AccessToken,
|
|
// APIClient.AccessTokenRule) plus the server's own `WEBTERM_TOKEN_RE`, and the
|
|
// orchestrator froze `WireProtocol` (a shared-secret helper does not belong in
|
|
// the cross-language wire contract). No single package can therefore see all
|
|
// three predicates at once — this test target is the ONLY place that can, so
|
|
// the anti-drift guard lives here (TokenPolicyDriftTests). The same deps let
|
|
// the token end-to-end leg drive the REAL client transport/HTTP layer against a
|
|
// REAL token-gated server instead of fakes (AccessTokenGateTests).
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "IntegrationTests",
|
|
platforms: [.iOS(.v17), .macOS(.v14)],
|
|
dependencies: [
|
|
.package(path: "../Packages/WireProtocol"),
|
|
.package(path: "../Packages/SessionCore"),
|
|
.package(path: "../Packages/HostRegistry"),
|
|
.package(path: "../Packages/APIClient"),
|
|
],
|
|
targets: [
|
|
.testTarget(
|
|
name: "IntegrationTests",
|
|
dependencies: [
|
|
.product(name: "WireProtocol", package: "WireProtocol"),
|
|
.product(name: "SessionCore", package: "SessionCore"),
|
|
.product(name: "HostRegistry", package: "HostRegistry"),
|
|
.product(name: "APIClient", package: "APIClient"),
|
|
],
|
|
path: ".",
|
|
exclude: ["scripts"]
|
|
),
|
|
],
|
|
swiftLanguageModes: [.v6]
|
|
)
|