Skip to content

Commit

Permalink
Add lakectl presigned upload test
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-har committed Oct 1, 2023
1 parent 1b25f9d commit 651d394
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions esti/lakectl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,23 @@ func TestLakectlBasicRepoActions(t *testing.T) {
RunCmdAndVerifyFailureWithFile(t, Lakectl()+" repo delete lakefs://"+repoName2+" -y", false, "lakectl_repo_delete_not_found", vars)
}

func TestLakectlPreSignUpload(t *testing.T) {
repoName := generateUniqueRepositoryName()
storage := generateUniqueStorageNamespace(repoName)
vars := map[string]string{
"REPO": repoName,
"STORAGE": storage,
"BRANCH": mainBranch,
}
RunCmdAndVerifySuccessWithFile(t, Lakectl()+" repo create lakefs://"+repoName+" "+storage, false, "lakectl_repo_create", vars)
RunCmdAndVerifySuccessWithFile(t, Lakectl()+" log lakefs://"+repoName+"/"+mainBranch, false, "lakectl_log_initial", vars)

filePath := "ro_1k.1"
vars["FILE_PATH"] = filePath
RunCmdAndVerifySuccessWithFile(t, Lakectl()+" fs upload -s files/ro_1k lakefs://"+repoName+"/"+mainBranch+"/"+filePath+" --presign", false, "lakectl_fs_upload", vars)

}

func TestLakectlCommit(t *testing.T) {
repoName := generateUniqueRepositoryName()
storage := generateUniqueStorageNamespace(repoName)
Expand Down

0 comments on commit 651d394

Please sign in to comment.