-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add esti tests for lakectl local with POSIX permissions #7962
Conversation
return LakectlWithParamsWithPosixPerms(accessKeyID, secretAccessKey, endPointURL, false) | ||
} | ||
|
||
func LakectlWithParamsWithPosixPerms(accessKeyID, secretAccessKey, endPointURL string, withPosixPerms bool) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this explicitly -
Rather keep this easy to delete (assuming it'll happen in the near future),
Than mess the whole code with changes (of adding a new param).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
esti/lakectl_local_test.go
Outdated
// the following commit "initializes" the posix permissions for the remote repo | ||
runCmd(t, lakectl+" local commit "+dataDir+" --allow-empty-message -m \" \"", false, false, vars) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: make it the commit message instead of a comment
// the following commit "initializes" the posix permissions for the remote repo | |
runCmd(t, lakectl+" local commit "+dataDir+" --allow-empty-message -m \" \"", false, false, vars) | |
commitMsg := "initialize the posix permissions for the remote repo" | |
runCmd(t, lakectl+" local commit "+dataDir+" -m " + commitMsg, false, false, vars) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH I prefer the fmt.Sprintf
way, I noticed it's like that from previous tests as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that fmt.Sprintf
will make this much less readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, good ideas -
Updated.
|
||
// the following commit "initializes" the posix permissions for the remote repo | ||
runCmd(t, lakectl+" local commit "+dataDir+" --allow-empty-message -m \" \"", false, false, vars) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add another validation here to check no changes after commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -277,7 +277,8 @@ func (s *SyncManager) upload(ctx context.Context, rootPath string, remote *uri.U | |||
if err := fileutil.VerifySafeFilename(source); err != nil { | |||
return err | |||
} | |||
dest := strings.TrimPrefix(filepath.ToSlash(fmt.Sprintf("%s%s%s", remote.GetPath(), uri.PathSeparator, path)), uri.PathSeparator) | |||
remotePath := strings.TrimRight(remote.GetPath(), uri.PathSeparator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding this change, see this PR.
No description provided.