feat: Working on updates to sem var and git client.

This commit is contained in:
2024-12-22 10:38:53 -05:00
parent 7959ec274b
commit 0484f45d57
10 changed files with 502 additions and 207 deletions

View File

@@ -11,7 +11,7 @@ final class GitVersionTests: XCTestCase {
$0.logger.logLevel = .debug
$0.logger = .liveValue
$0.asyncShellClient = .liveValue
$0.gitVersionClient = .liveValue
$0.gitClient = .liveValue
$0.fileClient = .liveValue
}, operation: {
super.invokeTest()
@@ -27,7 +27,7 @@ final class GitVersionTests: XCTestCase {
}
func test_live() async throws {
@Dependency(\.gitVersionClient) var versionClient: GitVersionClient
@Dependency(\.gitClient) var versionClient: GitClient
let version = try await versionClient.currentVersion(in: gitDir)
print("VERSION: \(version)")
@@ -35,24 +35,6 @@ final class GitVersionTests: XCTestCase {
XCTAssertNotEqual(version, "blob")
}
// func test_commands() throws {
// @Dependency(\.asyncShellClient) var shellClient: ShellClient
//
// XCTAssertNoThrow(
// try shellClient.background(
// .gitCurrentBranch(gitDirectory: gitDir),
// trimmingCharactersIn: .whitespacesAndNewlines
// )
// )
//
// XCTAssertNoThrow(
// try shellClient.background(
// .gitCurrentSha(gitDirectory: gitDir),
// trimmingCharactersIn: .whitespacesAndNewlines
// )
// )
// }
func test_file_client() async throws {
try await withTemporaryDirectory { tmpDir in
@Dependency(\.fileClient) var fileClient