Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
itaigilo committed Feb 6, 2025
1 parent 71e445a commit 3700ede
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
3 changes: 0 additions & 3 deletions esti/golden/lakectl_repo_create_with_storage_id.golden

This file was deleted.

21 changes: 10 additions & 11 deletions esti/lakectl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,6 @@ func TestLakectlBasicRepoActions(t *testing.T) {
}
RunCmdAndVerifySuccessWithFile(t, Lakectl()+" repo create lakefs://"+repoName+" "+storage, false, "lakectl_repo_create", vars)

// Validate the --storage-id flag (currently only allowed to be empty)
repoNameSID := generateUniqueRepositoryName()
storageSID := generateUniqueStorageNamespace(repoNameSID)
vars = map[string]string{
"REPO": repoNameSID,
"STORAGE": storageSID,
"BRANCH": mainBranch,
}
RunCmdAndVerifyFailureWithFile(t, Lakectl()+" repo create lakefs://"+repoNameSID+" "+storageSID+" --storage-id storage1", false, "lakectl_repo_create_with_storage_id", vars)
RunCmdAndVerifySuccessWithFile(t, Lakectl()+" repo create lakefs://"+repoNameSID+" "+storageSID+" --storage-id \"\"", false, "lakectl_repo_create", vars)

// lakectl repo list is expected to show the created repo

// Fails due to the usage of repos for isolation - esti creates repos in parallel and
Expand All @@ -75,6 +64,16 @@ func TestLakectlBasicRepoActions(t *testing.T) {
newStorage := storage + "/new-storage/"
RunCmdAndVerifyFailureWithFile(t, Lakectl()+" repo create lakefs://"+repoName+" "+newStorage, false, "lakectl_repo_create_not_unique", vars)

// Validate the --storage-id flag (currently only allowed to be empty)
repoNameSID := generateUniqueRepositoryName()
storageSID := generateUniqueStorageNamespace(repoNameSID)
vars = map[string]string{
"REPO": repoNameSID,
"STORAGE": storageSID,
"BRANCH": mainBranch,
}
RunCmdAndVerifySuccessWithFile(t, Lakectl()+" repo create lakefs://"+repoNameSID+" "+storageSID+" --storage-id \"\"", false, "lakectl_repo_create", vars)

// Fails due to the usage of repos for isolation - esti creates repos in parallel and
// the output of 'repo list' command cannot be well-defined
// RunCmdAndVerifySuccessWithFile(t, Lakectl()+" repo list", false, "lakectl_repo_list_1", vars)
Expand Down

0 comments on commit 3700ede

Please sign in to comment.