Skip to content

Permission test fails when run as root #14

@olivia-fl

Description

@olivia-fl

I discovered this while trying to add a package for rset to void linux, and found that the CI system is running as root in a docker container, causing this test to fail (void-linux/void-packages#31003).

Running it locally looks like this:

rset-2.1> sudo make test
make -C tests
make[1]: Entering directory '/home/benjamin/git/rset-2.1/tests'
---
0.003: Run rsub with no arguments
0.008: Replace a line, optionally append
0.008: Handle input containing special characters
0.007: Append a line
0.006: No change
0.003: Unable to open file
0.009: Add a new a block
0.011: Update a block
0.003: Ensure that a relative target cannot be used
---
0.002: Run miniquark with no arguments
0.001: HEAD request with target host and user-agent
0.001: HEAD request for missing file
Traceback (most recent call last):
        5: from test_miniquark.rb:131:in `<main>'
        4: from test_miniquark.rb:30:in `try'
        3: from test_miniquark.rb:132:in `block in <main>'
        2: from /usr/lib/ruby/2.7.0/socket.rb:659:in `tcp'
        1: from test_miniquark.rb:136:in `block (2 levels) in <main>'
test_miniquark.rb:39:in `eq': "GET a file that does have have read permission" (RuntimeError)
> HTTP/1.1 200 OK\r
> Date: Sat, 11 Jul 2020 01:25:02 GMT\r
> Connection: close\r
> Last-Modified: Sat, 11 Jul 2020 01:25:02 GMT\r
> Content-Type: application/octet-stream\r
> Content-Length: 0\r
> \r

< HTTP/1.1 403 Forbidden\r
< Date: Sat, 11 Jul 2020 01:25:02 GMT\r
< Connection: close\r
< Content-Type: text/plain\r
< \r
< 403 Forbidden
make[1]: *** [Makefile:15: test] Error 1
make[1]: Leaving directory '/home/benjamin/git/rset-2.1/tests'
make: *** [Makefile.bsd:72: test] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions