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

openSUSE / agama / 10316850700
72%

Build:
DEFAULT BRANCH: master
Ran 09 Aug 2024 09:29AM UTC
Jobs 3
Files 797
Run time 13min
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

09 Aug 2024 09:20AM UTC coverage: 71.302% (+0.4%) from 70.945%
10316850700

push

github

web-flow
Replace D-Bus with HTTP-based clients (#1438)

## Problem

- https://trello.com/c/hvPtBtMD

When moving to the new HTTP-based architecture, we took some shortcuts.
One of them was not using HTTP clients in the command-line interface. We
need to adapt the following clients:

-
[UsersClient](https://github.com/openSUSE/agama/blob/master/rust/agama-lib/src/users/client.rs)
-
[LocalizationClient](https://github.com/openSUSE/agama/blob/master/rust/agama-lib/src/localization/client.rs)
-
[ProductClient](https://github.com/openSUSE/agama/blob/master/rust/agama-lib/src/product/client.rs)
-
[StorageClient](https://github.com/openSUSE/agama/blob/master/rust/agama-lib/src/storage/client.rs)
-
[SoftwareClient](https://github.com/openSUSE/agama/blob/master/rust/agama-lib/src/software/client.rs)


## Solution

- `UsersClient` - still needed, because the HTTP service uses it to talk
to the Ruby backend. `UsersHTTPClient` added.
- `LocalizationClient` replaced with `LocalizationHTTPClient`

The rest will be done in subsequent PRs.


## Testing

- Tested manually with various correct and incorrect configs via `agama
config show` and `agama config load`. This is ripe for automation, even
in this PR.
- aaand: added tests that
- set up a trivial HTTP server (using
[httpmock](https://crates.io/crates/httpmock) - is the dependency size
OK?),
    -  mocking the JSON data and
    -  asserting what the Store classes make out of it


## Screenshots

*If the fix affects the UI attach some screenshots here.*

1987 of 2868 branches covered (69.28%)

Branch coverage included in aggregate %.

89 of 138 new or added lines in 10 files covered. (64.49%)

19746 of 27612 relevant lines covered (71.51%)

34.67 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% rust/agama-cli/src/config.rs
2
0.0
0.0% rust/agama-cli/src/questions.rs
2
0.0
0.0% rust/agama-lib/src/store.rs
2
92.31
92.31% rust/agama-lib/src/users/store.rs
3
66.67
rust/agama-lib/src/localization/http_client.rs
3
80.95
80.95% rust/agama-lib/src/localization/store.rs
3
46.15
46.15% rust/agama-lib/src/questions/http_client.rs
6
78.57
rust/agama-lib/src/users/http_client.rs
13
0.0
0.0% rust/agama-server/src/users/web.rs
14
63.16
63.16% rust/agama-lib/src/base_http_client.rs
Subprojects
ID Flag name Job ID Ran Files Coverage
3 rust 10316850700.3 09 Aug 2024 09:29AM UTC 88
25.32
GitHub Action Run
3 web 8937163624.3 03 May 2024 09:49AM UTC 343
75.3
GitHub Action Run
3 service 10265480000.3 06 Aug 2024 11:19AM UTC 366
86.86
GitHub Action Run
Source Files on build 10316850700
  • Tree
  • List 797
  • Changed 5
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #10316850700
  • c992adc2 on github
  • Prev Build on master (#10265480000)
  • Next Build on master (#10351651088)
  • Delete
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

© 2025 Coveralls, Inc