aglinxinyuan commented on code in PR #6134:
URL: https://github.com/apache/texera/pull/6134#discussion_r3524376731
##########
common/workflow-core/src/test/scala/org/apache/texera/amber/core/storage/util/dataset/GitVersionControlLocalFileStorageSpec.scala:
##########
@@ -56,4 +75,99 @@ class GitVersionControlLocalFileStorageSpec extends
AnyFlatSpec {
deleteIfExists(repoDir)
}
}
+
+ "GitVersionControlLocalFileStorage" should "support a full versioned
lifecycle over a temp repo" in {
+ // Create then delete the temp dir so initRepo exercises its
createDirectories branch.
+ val repoDir = Files.createTempDirectory("texera-vc-lifecycle")
+ deleteIfExists(repoDir)
+ assert(!Files.exists(repoDir))
+
+ try {
+ val branch = GitVersionControlLocalFileStorage.initRepo(repoDir)
+ assert(branch != null)
+ assert(Files.exists(repoDir.resolve(".git")))
+ setIdentity(repoDir)
+
+ // Write a top-level file (hello.txt) into the repo and commit it as
version "v1".
+ // A nested path would exercise JGitVersionControl.add's OS-separator
pathspec, which
+ // JGit rejects on Windows; the versioned-storage surface is covered
with a root file.
+ val relative = repoDir.resolve("hello.txt")
+ val content = "hello-versioned-content"
Review Comment:
Renamed `relative` -> `filePathInRepo` (it's an absolute path under the
repo, not a relative one) and updated its usages (842b10d).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]