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

openSUSE / agama / 10526235787
71%
master: 72%

Build:
Build:
LAST BUILD BRANCH: storage-volume-keywords
DEFAULT BRANCH: master
Ran 23 Aug 2024 01:13PM UTC
Jobs 3
Files 798
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

23 Aug 2024 10:23AM UTC coverage: 71.351% (+0.03%) from 71.319%
10526235787

Pull #1548

github

mvidner
test: SoftwareStore::store happy

Note the `when.(...).body("{JSON object}")` part

where the JSON must match what the client sends,
otherwise the mock server will respond with a 404,
and the test will rightly fail with:
```
Error: BackendError(404, "{\"message\":\"Request did not match any route or mock\"}")
```

The problem is that if you compose that JSON according to your best understanding of the client but make a typo, you are still left with that unhelpful 404.

These 3 parts were all need to arrive at a working string:

1. Enable httpmock logging by calling `env_logger::init();` at the start of the test function.
2. Show the request, by enabling the logging at runtime, at the right level: (`test_setting_software` is a partial match on the test name).

```console
(cd rust; RUST_LOG=httpmock=debug cargo test test_setting_software)
```

If you don't like typing, the really important bits are these. httpmock will also log the more detailed Trace level but it does not get in the way
```console
RUST_LOG=httpmock cargo test
```

3. Unfortunately the request will be logged not as text but as an array of bytes shown numerically. [Process the output with this script to extract the text.][extract]

[extract]: https://gist.github.com/mvidner/0e22ea82abecb44b469841929e5ec279#file-httpmock_body-rb
Pull Request #1548: `agama config load`/`store` for "software" uses the HTTP API

1987 of 2868 branches covered (69.28%)

Branch coverage included in aggregate %.

14 of 21 new or added lines in 3 files covered. (66.67%)

19800 of 27667 relevant lines covered (71.57%)

34.81 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
3 rust 10526235787.3 23 Aug 2024 01:13PM UTC 0
25.63
GitHub Action Run
3 web 8937163624.3 03 May 2024 09:49AM UTC 0
75.3
GitHub Action Run
3 service 10468008056.3 20 Aug 2024 08:28AM UTC 0
86.87
GitHub Action Run
Source Files on build 10526235787
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #10526235787
  • Pull Request #1548
  • PR Base - master (#10468008056)
  • 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

© 2026 Coveralls, Inc