Remove low-value tests

This commit is contained in:
Kaede Akino committed 2026-09-21 16:48:52 +08:00
1 parent 97e2362d7d
commit 44831f620b
4 files changed
+14 -40

No files matched your search

+14
View File
@@ -258,6 +258,20 @@ never justifies extraction. Keep schemas, native lists/terminal teardown and loc
authorized-Key tests passed; all 381 Framework tests passed. The default macOS run finished with 1,792 passed, 64
opt-in skips and no failures. Changed-file strict formatting, diff checks and Chinese localization passed.
### 2026-09-21 — low-value test scan
- **Evidence:** the macOS and iOS `ProviderHTTPIntegrationTests.swift` files were byte-for-byte identical, imported only
`AgentKit` and `TermindApplication`, and exercised no platform adapter. `memoryFollowsMCPInAISettings` only repeated the
declaration order of a four-case `CaseIterable` enum. `connectionsCategoryUsesTheConnectSymbol` only repeated one
direct `switch` return. The scan also reviewed the smallest suites and literal assertions; tests protecting escaping,
persistence compatibility, migrations, secrets, runtime library linkage and user-visible behavior remain.
- **Action:** retain one HTTP integration smoke test in the macOS suite and delete the identical iOS copy; remove the two
declaration snapshots. No production code or test behavior is replaced.
- **Result:** removed one duplicate file and two low-value tests, reducing test code by 40 lines.
- **Verification:** the focused macOS suite passed two tests with its opt-in rendering case skipped by default; the focused
iOS suite passed all 23 tests. Strict formatting for changed Swift files, duplicate-file scan, diff checks and Chinese
localization validation passed.
### 2026-09-21 — shared Host Custom Identity editing (complete)
- **Evidence:** `HostEditorView` and `MobileHostEditor` independently retain and load the same Custom SSH/Proxy Identity
-4
View File
@@ -198,10 +198,6 @@ struct MobileAISettingsTests {
#expect(!probes.running)
}
@Test func memoryFollowsMCPInAISettings() {
#expect(MobileAISettingsDestination.allCases == [.models, .skills, .mcp, .memory])
}
@Test func skillsSaveAsDraftsThenLockNamesWithoutChangingRemoteFields() throws {
let library = SkillLibraryModel()
let new = MobileSkillEditorModel(library: library, skill: AgentSkill(name: ""))
@@ -1,32 +0,0 @@
import AgentKit
import Foundation
import TermindApplication
import Testing
/// Opt-in real-network smoke test against a disposable compatible model server.
/// TERMIND_MODEL_HTTP_TEST_URLS is a comma-separated list of base URLs. The server
/// answers ordinary prompts with OK and honors the title/command JSON contracts.
@Suite @MainActor
struct ProviderHTTPIntegrationTests {
@Test func nativeAppCanUseAnonymousHTTPEndpoints() async throws {
guard let urls = ProcessInfo.processInfo.environment["TERMIND_MODEL_HTTP_TEST_URLS"] else { return }
for base in urls.split(separator: ",").map(String.init) {
let provider = ModelProvider(
name: "Anonymous HTTP", inferenceURL: base + "/chat/completions", baseURL: base,
models: [AIModel(id: "test")])
let ai = AIConfigurationModel(modelProviders: [provider], persistsSecrets: false)
let secret = try #require(ai.modelSecret(for: provider))
#expect(secret.isEmpty)
let models = try await ModelCatalogClient().models(for: provider, secret: secret)
#expect(models.map(\.id) == ["test"])
let probe = try await ChatProbe().run(model: provider.models[0], on: provider, secret: secret)
#expect(probe.reply == "OK")
let command = CommandGeneratorController(ai: ai)
#expect(command.isLocallyAvailable)
#expect(try await command.generate(.init(draft: "say OK", shell: "zsh", cwd: "/tmp")) == "echo OK")
let title = try await ConversationTitleController(ai: ai).summarize(
.init(firstUserMessage: "Say OK", firstAssistantMessage: "OK"))
#expect(title == "Local model")
}
}
}
@@ -8,10 +8,6 @@ import Testing
@Suite(.serialized) @MainActor
struct SFTPSettingsIntegrationTests {
@Test func connectionsCategoryUsesTheConnectSymbol() {
#expect(SettingsCategory.connections.symbol == MenuSymbol.connect)
}
@Test func localAndRemoteChangesReachTheQueueWithoutOpeningSettings() {
let settings = SFTPSettingsModel()
let app = AppModel(hosts: HostLibraryModel(), sftpSettings: settings)