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

PulpQE / pulp-smash / 1609
63%

Build:
DEFAULT BRANCH: master
Ran 08 Jun 2017 05:23PM UTC
Jobs 3
Files 7
Run time 2min
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
1609

push

travis-ci

Ichimonji10
Update method `utils.sync_repo`

The `sync_repo` method has been around for a long time. A typical usage
is as follows, where `repo_href` is a simple string path:

```python
utils.sync_repo(cfg, repo_href)
```

Update the method so that it accepts a dict of repository information
instead of a simple string path. A typical usage is as follows, where
`repo` is a dict like `{'_href': repo_href}`:

```python
utils.sync_repo(cfg, repo)
```

This change has two advantages. First, Pulp's API returns information
about repositories as a dict. Letting `sync_repo` accept a dict means
that it can accept the data returned by Pulp's API with no munging.
Second, this change makes `sync_repo` more consistent with other modern
methods like `publish_repo`. Both of these advantages are well explained
by an example. Consider this legacy code:

```python
repo = api_client.post(REPOSITORY_PATH, body)
utils.sync_repo(cfg, repo['_href'])
utils.publish_repo(cfg, repo)
```

The code above can now be written as follows:

```python
repo = api_client.post(REPOSITORY_PATH, body)
utils.sync_repo(cfg, repo)
utils.publish_repo(cfg, repo)
```

522 of 841 relevant lines covered (62.07%)

1.86 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1609.1 08 Jun 2017 05:23PM UTC 0
62.07
Travis Job 1609.1
2 1609.2 08 Jun 2017 05:25PM UTC 0
62.07
Travis Job 1609.2
3 1609.3 08 Jun 2017 05:25PM UTC 0
62.07
Travis Job 1609.3
Source Files on build 1609
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1609
  • de034aef on github
  • Prev Build on master (#1606)
  • Next Build on master (#1611)
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