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

agama-project / agama / 16651372759
74%

Build:
DEFAULT BRANCH: master
Ran 31 Jul 2025 02:23PM UTC
Jobs 3
Files 1134
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

31 Jul 2025 02:10PM UTC coverage: 64.162% (-0.06%) from 64.222%
16651372759

push

github

web-flow
feat: embed questions configuration in the profile (#2612)

## Problem

* Bug [bsc#1246997](https://bugzilla.suse.com/show_bug.cgi?id=1246997)

To answer questions in advance when using the unattended mode, it is
required to use a pre-script. If you just want Agama to use the default
values, it is kind of straight-forward:

```jsonnet
  scripts: {
    pre: [
      {
        name: 'disable-questions',
	content: |||
          #!/usr/bin/bash
          agama questions mode non-interactive
	|||
      }
    ]
  }
```

However, if you want to answer an specific question (e.g., providing a
password for an existing encrypted file system) it is kind of tricky.
You might need to create a file like this:

```json
  {
    "answers": [
      {
        "password": "my-password",
        "class": "storage.luks_activation"
      },
    ]
  }
```

And the load it using a pre-script:

```jsonnet
  scripts: {
    pre: [
      {
        name: 'disable-questions',
	content: |||
          #!/usr/bin/bash
          agama download http://my-server.lan/answers.json answers.json
          agama questions answers answers.json
	|||
      }
    ]
  }
```

## Solution

Allow embedding the answers in the profile.

```json
  "questions": {
    "policy": "auto",
    "answers": [
      { "class": "storage.luks_activation", "password": "nots3cr3t" }
    ]
```

* `policy`: ask the user (`user`) or choose the default option (`auto`).
* `answers`: list of answers to the given question.

## Testing

- *Added a new unit test*
- *Tested manually*

2135 of 3884 branches covered (54.97%)

Branch coverage included in aggregate %.

2 of 57 new or added lines in 8 files covered. (3.51%)

1 existing line in 1 file now uncovered.

24842 of 38161 relevant lines covered (65.1%)

49.12 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
63.33
rust/agama-lib/src/questions/answers/custom.rs
4
46.15
-8.39% rust/agama-lib/src/questions/http_client.rs
4
0.0
0.0% rust/agama-lib/src/store.rs
6
0.0
rust/agama-lib/src/questions/answers/default.rs
6
0.0
rust/agama-lib/src/questions/store.rs
10
0.0
0.0% rust/agama-server/src/questions.rs
24
0.0
0.0% rust/agama-server/src/questions/web.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
0.0
0.0% rust/agama-server/src/questions.rs
Subprojects
ID Flag name Job ID Ran Files Coverage
1 rust 16651372759.1 31 Jul 2025 02:23PM UTC 185
21.86
GitHub Action Run
3 service 16651313051.3 31 Jul 2025 02:12PM UTC 389
88.52
GitHub Action Run
3 web 16646245929.3 31 Jul 2025 10:17AM UTC 560
68.05
GitHub Action Run
Source Files on build 16651372759
  • Tree
  • List 1134
  • Changed 7
  • Source Changed 7
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #16651372759
  • 77785229 on github
  • Prev Build on master (#16651313051)
  • Next Build on master (#16677913122)
  • 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