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

kobotoolbox / kpi / 17643918469
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1497-show-most-recently-created-qual-answer
DEFAULT BRANCH: master
Ran 11 Sep 2025 12:38PM UTC
Jobs 2
Files 861
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

11 Sep 2025 12:05PM UTC coverage: 81.151% (+0.01%) from 81.139%
17643918469

push

github

web-flow
feat(dataCollectors): update enketo links when data collectors change DEV-798 (#6198)

### đŸ“Ŗ Summary
Create/update enketo links for data collectors when assigning data
collectors to groups or rotating tokens.

### 💭 Notes
This PR handles the following situations:
1. A data collector is added to an existing data collector group -> we
generate links for that data collector for all the assets under that
group
2. A data collector is removed from a group -> we remove all links for
the data collector (since they can only be in one group)
3. A data collector token is rotated -> we replace all existing links to
/key/<old_token> with /key/<new_token> in redis
4. A data collector is deleted -> we remove all their links

### 👀 Preview steps

1. â„šī¸ have a superuser account and at least one another account with a
project my_project
2. In Django admin, create a new data collector groups (DCG_0) with at
least 1 data collector (DC_00)
3. In Django admin, assign my_project to DCG_0
4. In redis-cli, run hget "or:http://<kobo_url>/key/<DC_00's token>"
"my_project_uid" and make note of the enketo_id you get back
5. In the browser, navigate to <enketo_url>/x/<enketo_id>. Take note of
this url
6. đŸŸĸ You should get an error message `Request to
http://kf.kobo.local:8080/key/<DC_00
token>/formList?formID=<my_project_uid> failed`
7. Rotate DC_00's token
8. Refresh the enketo page
9. đŸŸĸ You should get an error message `Request to
http://kf.kobo.local:8080/key/<new
token>/formList?formID=<my_project_uid> failed` (note the new token)
10. Remove DC_00 from the group
11. Refresh the enketo page
12. đŸŸĸ You should get `Survey with this ID not found`
13. Add a new data collector to DCG_0
14. Repeat steps 4-6 with the new data collector

6869 of 10848 branches covered (63.32%)

25 of 26 new or added lines in 2 files covered. (96.15%)

27 existing lines in 2 files now uncovered.

26594 of 32771 relevant lines covered (81.15%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
95.45
-4.55% kobo/apps/data_collectors/signals.py

Uncovered Existing Lines

Lines Coverage ∆ File
3
90.52
-2.59% kpi/views/environment.py
24
75.49
-23.53% kpi/utils/usage_calculator.py
Jobs
ID Job ID Ran Files Coverage
1 17643918469.1 11 Sep 2025 12:38PM UTC 861
78.83
2 17643918469.2 11 Sep 2025 12:42PM UTC 861
81.13
Source Files on build 17643918469
  • Tree
  • List 861
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • bb8dd775 on github
  • Prev Build on main (#17628729072)
  • Next Build on main (#17656366379)
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