• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PulpQE / pulp-smash / 2852
63%

Build:
DEFAULT BRANCH: master
Ran 06 Sep 2018 07:39PM UTC
Jobs 4
Files 14
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2852

push

travis-ci

rochacbruno
Added a `sudo` argument to method `cli.Client.run` to avoid boilerplate.

As part of our `less boilerplate` effort I added a new method `sudo` argument
to `cli.Client.run`.

In a lot of test cases there are code like:

```python
sudo = () if cli.is_root(cfg) else ('sudo',)
...
client.run(sudo + ('command_name', 'argument1', ...))
```

The idea is to replace the above boilerplate with

```python
client.run(('command_name', 'argument1', ...), sudo=True)
```

With this change we will be able to remove the `sudo = () if cli.is_root(cfg) else ('sudo',)` boilerplate in those Pulp-2-tests referenced:

```bash

pulp_2_tests/tests/docker/utils.py:    sudo = '' if cli.is_root(cfg) else 'sudo'
pulp_2_tests/tests/puppet/api_v2/test_install_distributor.py:        sudo = () if cli.is_root(self.cfg) else ('sudo',)
pulp_2_tests/tests/rpm/api_v2/test_content_sources.py:        sudo = () if cli.is_root(cls.cfg) else ('sudo',)
pulp_2_tests/tests/rpm/api_v2/test_content_sources.py:        sudo = () if cli.is_root(cls.cfg) else ('sudo',)
pulp_2_tests/tests/rpm/api_v2/test_content_sources.py:    sudo = '' if cli.is_root(cfg) else 'sudo'
pulp_2_tests/tests/rpm/api_v2/test_crud.py:        sudo = () if cli.is_root(self.cfg) else ('sudo',)
pulp_2_tests/tests/rpm/api_v2/test_download_policies.py:        sudo = '' if cli.is_root(cls.cfg) else 'sudo '
pulp_2_tests/tests/rpm/api_v2/test_errata.py:        # sudo = () if cli.is_root(cfg) else ('sudo',)
pulp_2_tests/tests/rpm/api_v2/test_errata.py:        sudo = () if cli.is_root(cfg) else ('sudo',)
pulp_2_tests/tests/rpm/api_v2/test_export.py:        self.__sudo = None
pulp_2_tests/tests/rpm/api_v2/test_export.py:            self.__sudo = '' if cli.is_root(self.cfg) else 'sudo '
pulp_2_tests/tests/rpm/api_v2/test_iso_sync_publish.py:        sudo = () if cli.is_root(self.cfg) else ('sudo',)
pulp_2_tests/tests/rpm/api_v2/test_modularity.py:        sudo = () if cli.is_root(cfg) else ('sudo',)
pulp_2_tests/tests/rpm/api_v2/test_republis... (continued)

656 of 1056 relevant lines covered (62.12%)

2.48 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2852.1 06 Sep 2018 07:40PM UTC 0
62.12
Travis Job 2852.1
2 2852.2 06 Sep 2018 07:40PM UTC 0
62.12
Travis Job 2852.2
3 2852.3 06 Sep 2018 07:39PM UTC 0
62.12
Travis Job 2852.3
4 2852.4 06 Sep 2018 07:40PM UTC 0
62.12
Travis Job 2852.4
Source Files on build 2852
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2852
  • f8a21c39 on github
  • Prev Build on master (#2847)
  • Next Build on master (#2854)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc