Skip to content
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

sudo required by assert_file_owner? #37

Closed
flickerfly opened this issue Mar 5, 2021 · 2 comments · Fixed by #38
Closed

sudo required by assert_file_owner? #37

flickerfly opened this issue Mar 5, 2021 · 2 comments · Fixed by #38

Comments

@flickerfly
Copy link

When I run checks with assert_file_owner it seems to complain about sudo.

If I uncomment the assert_file_owner lines, this passes.

@test "verify we can setup the log location" {
  INT_REPOSITORY_DIR="/tmp"
  LOG_DIR="$INT_REPOSITORY_DIR/logs/"
  rm -rf "$LOG_DIR"
  run log_setup
  assert_dir_exist "$LOG_DIR"
  assert_file_owner tcsuser "$LOG_DIR"  # This seems to be the problem line
}

If I leave either of the second to last line, I get an error like this.

 ✗ verify we can setup the bluray log location
   (in test file test/TCSstart_BLURAY_install.sh.bats, line 144)
     `assert_dir_exist "$LOG_DIR"' failed with status 127
   /opt/bats/lib/bats-file/src/file.bash: line 297: sudo: command not found
@leventyalcin
Copy link

I've fixed this issue in the PR #38. However, tests are failing at something unrelated. I'll come back at that and see if I make tests pass.

@leventyalcin
Copy link

Well, with the PR, I've solved

  • sudo placement bug
  • regressions introduced with some other commits
  • easier local development environment for everyone.

Hope it will be merged 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants