Skip to content
  • Simon Chabot's avatar
    fix(tests): test_chmod checks whether the permissions are the same as the source file · 8b49be4828fc
    Simon Chabot authored
    test_chmod used to check that permission are 644, but this is not what is done
    in the `process_resource` method. This function sets the permissions to the same
    as the source file.
    
    As a consequence, depending on your configuration (default umask for instance),
    you may end up with the expected 644 permissions or… something else. (666 on our
    gitlab-runner for instance).
    
    To make the test consistent with what is done in the function, and consistent
    with the initial purpose of this test [0], let's simply check that the
    permissions of the source file and the compiled file are the same.
    
    If it appears that this is not enough, a solution could be to enforce 644
    permissions in the `process_resource` method, or give the expected permissions
    through parameters.
    
    [0]: https://www.cubicweb.org/ticket/17143773
    8b49be4828fc