# Package CI problems

**URL:** https://forum.yunohost.org/t/package-ci-problems/40649
**Category:** Contribute Room
**Tags:** english
**Created:** [October 30, 2025, 7:00pm UTC](https://forum.yunohost.org/t/package-ci-problems/40649 "2025-10-30T19:00:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jedie](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jedie](https://forum.yunohost.org/u/jedie)
#### Post date: [October 30, 2025, 7:00pm UTC](https://forum.yunohost.org/t/package-ci-problems/40649/1 "2025-10-30T19:00:14Z")

</div>

I updated by project here: [master \<- testing by jedie · Pull Request #40 · YunoHost-Apps/django-fmd\_ynh · GitHub](https://github.com/YunoHost-Apps/django-fmd_ynh/pull/40)

In the new v0.9.1 version it works like this:

Requesting the root page “/” as anonymous will redirect to login `/yunohost/sso/?next=/`  
So the user is authenticated via SSO and can access the root page.

Before this Pull request it was a intermediate page rendered by django.

I tested the new changes manually on my YunoHost installation and it works fine.

But in CI it totally fails:

> **[YunoRunner for CI](https://ci-apps-dev.yunohost.org/ci/job/14252)**

 ![grafik](https://forum.yunohost.org/uploads/default/original/2X/c/cbff60ab494fa769f3138e7abce9b36d03e76db3.png)

I still have the old `check_process` file, but looking at [GitHub - YunoHost/package\_check: Shell script which check package actions: install, remove, upgrade, backup, restore…](https://github.com/YunoHost/package_check) offers that’s not supported anymore? Was replaced by `tests.toml`  
Is the the problem?!?

---

<div class="post-metadata">

### Author: ![jedie](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jedie](https://forum.yunohost.org/u/jedie)
#### Post date: [October 30, 2025, 7:21pm UTC](https://forum.yunohost.org/t/package-ci-problems/40649/2 "2025-10-30T19:21:02Z")

</div>

Maybe [Remove "check\_process" and update tests.toml by jedie · Pull Request #41 · YunoHost-Apps/django-fmd\_ynh · GitHub](https://github.com/YunoHost-Apps/django-fmd_ynh/pull/41) fill fix it 😉

---

<div class="post-metadata">

### Author: ![jedie](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jedie](https://forum.yunohost.org/u/jedie)
#### Post date: [October 30, 2025, 8:33pm UTC](https://forum.yunohost.org/t/package-ci-problems/40649/3 "2025-10-30T20:33:48Z")

</div>

Think i found a limitation in `tests.toml`

I would like to test that anonymous users will be redirect to SSO portal for login. But this can’t be tested, because this doesn’t work:

```auto
    # Access the root page not logged in results in redirect to portal to login
    home.path = "/"
    home.logged_on_sso = false
    home.expect_effective_url = "https:// __DOMAIN__ /yunohost/sso/?next=/"

    # Access the Django Admin not logged in results in redirect to portal to login
    admin.path = "/admin/"
    admin.logged_on_sso = false
    admin.expect_effective_url = "https:// __DOMAIN__ /yunohost/sso/?next=/admin/"

```

`expect_effective_url` can’t have placeholders, isn’t it?

It’s also not possible to just test the `expect_return_code`, because empty `expect_effective_url` will also not work.

```auto
    if expect_effective_url is None and "/yunohost/sso" in effective_url:
        errors.append(
            f"The request was redirected to yunohost's portal ({effective_url})"
        )
    if expect_effective_url and expect_effective_url != effective_url:
        errors.append(
            f"Ended up on URL '{effective_url}', but was expecting '{expect_effective_url}'"
        )

```

see: [package\_check/lib/curl\_tests.py at 744f0baa48eb8535fb7022033231266884d0f8d1 · YunoHost/package\_check · GitHub](https://github.com/YunoHost/package_check/blob/744f0baa48eb8535fb7022033231266884d0f8d1/lib/curl_tests.py#L192-L199)

---

<div class="post-metadata">

### Author: ![jedie](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jedie](https://forum.yunohost.org/u/jedie)
#### Post date: [October 30, 2025, 8:44pm UTC](https://forum.yunohost.org/t/package-ci-problems/40649/4 "2025-10-30T20:44:06Z")

</div>

Untested PR to Allow “ **DOMAIN** ” placeholder in `expect_effective_url` :

> <https://github.com/YunoHost/package_check/pull/203>
>
> See: https://forum.yunohost.org/t/package-ci-problems/40649/3

---

<div class="post-metadata">

### Author: ![jedie](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/j/b5a626/32.png) [@jedie](https://forum.yunohost.org/u/jedie)
#### Post date: [October 31, 2025, 7:58pm UTC](https://forum.yunohost.org/t/package-ci-problems/40649/5 "2025-10-31T19:58:19Z")

</div>

Sadly it’s more complicated.

Replacement of ` __DOMAIN__ ` is helpfull but it’s sadly not possible to test the “need login” redirections via **tests.toml** if the App can be installed at root domain and in a directory.

But the “return to app” values like `/yunohost/sso/?r=aHR0cHM6Ly90ZXN0c2VydmVyL2FwcF9wYXRoL2xvZ2luLXJlcXVpcmVkLw%3D%3D` depends on install location. So they can’t hardcoded into **tests.toml**

What about a complete different solution for these kind of tests?

In **tests.toml** it’s only needed to define the URL of the App, that will redirect to SSO login.  
The “package\_check / curl\_tests” will do the complete login flow with correct redirects and it only pass the test if we are redirected back to the app. In this case tests like “expect\_title” and “expect\_content” are then also possible.
