Skip to content

Tests try to access the home directory of the user running the file #126

@satanas

Description

@satanas

Nomadium comments:

Hi folks,

I'm looking for help with this bug. For full context, please take a
look at:

What is happening here is: a Debian autobuilder is unable to build
libturpial from source. This is a serious bug and has caused to get
turpial dropped from testing.

The autobuilder is failing because libturpial unit tests are trying to
write in the homedir of the user who is running the build and this
violates Debian guidelines (a package should not try to write outside
its builddir).

I was hacking the unit tests but I'm unable to get a reasonable fix
for this issue. The files with problematic unit tests are:

  • tests/test_column_manager.py
  • tests/test_account_manager.py
  • tests/test_core.py

I stumbled upon these two situations:

  • I tried to pass an explicit basedir to libturpial.config.AppConfig
    constructor to override the default basedir pointing to the homedir of
    the user running libturpial. I did this on tests/test_column_manager.py
    and tests/test_account_manager.py.
  • On tests/test_core.py I noticed that I can't specify an explicit
    basedir when you create an instance of libturpial.api.core.Core, so this
    is going to try to create ~user/.config/turpial.

I'm looking for help to get a fix or workaround for this issue.

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