Skip to content

Commit

Permalink
Upload -r work for a single file
Browse files Browse the repository at this point in the history
  • Loading branch information
idanovo committed Mar 18, 2024
1 parent 94fb45f commit 9ada50a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion esti/lakectl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,13 @@ func TestLakectlFsUpload(t *testing.T) {
})
t.Run("single_file_with_recursive", func(t *testing.T) {
vars["FILE_PATH"] = "data/ro/ro_1k.0"
RunCmdAndVerifyFailure(t, Lakectl()+" fs upload --recursive -s files/ro_1k lakefs://"+repoName+"/"+mainBranch+"/"+vars["FILE_PATH"], false, "\ndiff 'local://files/ro_1k/' <--> 'lakefs://${REPO}/${BRANCH}/${FILE_PATH}'...\nlstat files/ro_1k/: not a directory\nError executing command.\n", vars)
sanitizedResult := runCmd(t, Lakectl()+" fs upload --recursive -s files/ro_1k lakefs://"+repoName+"/"+mainBranch+"/"+vars["FILE_PATH"], false, false, vars)
require.Contains(t, sanitizedResult, "diff 'local://files/' <--> 'lakefs://"+repoName+"/"+mainBranch+"/"+vars["FILE_PATH"]+"'...")
require.Contains(t, sanitizedResult, "upload .")
require.Contains(t, sanitizedResult, "Upload Summary:")
require.Contains(t, sanitizedResult, "Downloaded: 0")
require.Contains(t, sanitizedResult, "Uploaded: 1")
require.Contains(t, sanitizedResult, "Removed: 0")
})
t.Run("dir", func(t *testing.T) {
vars["FILE_PATH"] = "data/ro/"
Expand Down

0 comments on commit 9ada50a

Please sign in to comment.