mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-04-20 19:28:23 +00:00
test_wrapper: add test for repo script executable permission
Add a test to verify that the repo launcher script has the executable bit set, guarding against accidental permission changes. Change-Id: I314658b57ed174673188fbbc5962d9fdeefac97d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/569242 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Carlos Fernandez <carlosfsanz@meta.com> Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Carlos Fernandez <carlosfsanz@meta.com>
This commit is contained in:
@@ -106,6 +106,11 @@ class TestRepoWrapper:
|
||||
>= repo_wrapper.MIN_PYTHON_VERSION_HARD
|
||||
)
|
||||
|
||||
def test_repo_script_is_executable(self) -> None:
|
||||
"""The repo launcher script should be executable."""
|
||||
repo_path = utils_for_test.THIS_DIR.parent / "repo"
|
||||
assert os.access(repo_path, os.X_OK), f"{repo_path} is not executable"
|
||||
|
||||
def test_init_parser(self, repo_wrapper: wrapper.Wrapper) -> None:
|
||||
"""Make sure 'init' GetParser works."""
|
||||
parser = repo_wrapper.GetParser()
|
||||
|
||||
Reference in New Issue
Block a user