Closed serhiy-yevtushenko closed 7 years ago
Hi,
when trying to do test with filebeat, which obtains the content_str of the file with permission 0o640, I obtain the following exception:
self = <file /etc/filebeat/filebeat.yml>, decode = True
def _get_content(self, decode): out = self.run_test("cat -- %s", self.path) if out.rc != 0:
raise RuntimeError("Unexpected output %s" % (out,)) E RuntimeError: Unexpected output CommandResult(command='cat -- /etc/filebeat/filebeat.yml', exit_status=1, stdout=None, stderr='cat: /etc/filebeat/filebeat.yml: Permission denied\n')
raise RuntimeError("Unexpected output %s" % (out,))
E RuntimeError: Unexpected output CommandResult(command='cat -- /etc/filebeat/filebeat.yml', exit_status=1, stdout=None, stderr='cat: /etc/filebeat/filebeat.yml: Permission denied\n')
Similar test passes without problems, when using serverspec
One should use --sudo argument, then it works
Note that you can activate sudo locally with the sudo fixture
Hi,
when trying to do test with filebeat, which obtains the content_str of the file with permission 0o640, I obtain the following exception:
self = <file /etc/filebeat/filebeat.yml>, decode = True
Similar test passes without problems, when using serverspec