Skip to content

enterprise: fix enterprise_test skipping tests when used as class decorator - #24138

Merged
BeryJu merged 1 commit into
mainfrom
fix_ent_test
Jul 17, 2026
Merged

BeryJu merged 1 commit into
mainfrom
fix_ent_test

Conversation

@melizeche

Copy link
Copy Markdown
Member

#18404 replaced patch_license with enterprise_test(), but the new decorator only handles functions.

When applied to a class it replaces the class with a plain function, so pytest silently collects nothing from it.
The suites in enterprise/reports/tests and enterprise/lifecycle/tests/test_api.py currently run 0 tests on main.

This makes enterprise_test() handle classes the same way mock.patch does: wrap each test* method and return the class.

Before/after:

  • enterprise/reports/tests/test_api.py: 0 -> 2 tests
  • enterprise/lifecycle/tests/test_api.py: 0 -> 21 tests

Checklist

  • The project has been linted, built, and tested (make all)
  • The documentation has been updated and formatted (make docs)

@melizeche
melizeche requested a review from a team as a code owner July 17, 2026 03:58
@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 251cc93
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a59a85d59db420008016762
😎 Deploy Preview https://deploy-preview-24138--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.38%. Comparing base (efc5f1a) to head (251cc93).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24138      +/-   ##
==========================================
+ Coverage   92.84%   93.38%   +0.53%     
==========================================
  Files        1056     1056              
  Lines       62751    62759       +8     
  Branches      424      424              
==========================================
+ Hits        58259    58605     +346     
+ Misses       4492     4154     -338     
Flag Coverage Δ
conformance 35.55% <0.00%> (-0.01%) ⬇️
e2e 40.60% <0.00%> (-0.02%) ⬇️
integration 31.97% <0.00%> (-0.05%) ⬇️
rust 0.00% <ø> (ø)
unit 92.59% <100.00%> (+0.59%) ⬆️
unit-migrate 92.61% <100.00%> (+0.59%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@github-actions

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-251cc93ff2cf6f3315b7c6541c7bf1dee881a865
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-251cc93ff2cf6f3315b7c6541c7bf1dee881a865

Afterwards, run the upgrade commands from the latest release notes.

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Jul 17, 2026
@BeryJu
BeryJu merged commit 58dab26 into main Jul 17, 2026
123 checks passed
@BeryJu
BeryJu deleted the fix_ent_test branch July 17, 2026 11:46
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Jul 17, 2026
kensternberg-authentik added a commit that referenced this pull request Jul 18, 2026
* main:
  policies: filter policy engine (#24025)
  endpoints/connectors/agent: fix auth schema for device endpoints (#24164)
  core, web: update translations (#24137)
  packages/django-dramatiq-postgres/broker: use positive state filter for pending messages (#24074)
  events: fix typo (#24161)
  root: fix agents test instructions (#24119)
  enterprise: fix enterprise_test skipping tests when used as class decorator (#24138)
  core: bump library/nginx from `ec4ed8b` to `b5a9a3c` in /website (#24146)
  core: bump github.com/pires/go-proxyproto from 0.14.0 to 0.15.0 (#24139)
  core: bump library/node from `ffc7838` to `715e55e` in /lifecycle/container (#24142)
  core: bump pnpm/pnpm from 11.12.0 to 11.13.0 in /lifecycle/container (#24144)
  core: bump library/golang from `ee5a795` to `3f1e064` in /lifecycle/container (#24143)
  core: bump pnpm/pnpm from 11.12.0 to 11.13.0 in /website (#24147)
  core: bump kubernetes from 36.0.2 to 36.0.3 (#24145)
  core: bump docker from 7.1.0 to 7.2.0 (#24149)
  web: bump webcomponent-qr-code from 1.3.0 to 2.0.0 in /web (#24152)
  core: bump regex from 1.12.4 to 1.13.0 (#24150)
  core: bump rust-toolchain from 1.97.0 to 1.97.1 (#24148)
  website/docs: cleanup 07-12: refresh contributor guidance (#23969)
  packages/ak-common/db: ignore empty passwords (#24127)
kensternberg-authentik added a commit that referenced this pull request Jul 18, 2026
* main:
  policies: filter policy engine (#24025)
  endpoints/connectors/agent: fix auth schema for device endpoints (#24164)
  core, web: update translations (#24137)
  packages/django-dramatiq-postgres/broker: use positive state filter for pending messages (#24074)
  events: fix typo (#24161)
  root: fix agents test instructions (#24119)
  enterprise: fix enterprise_test skipping tests when used as class decorator (#24138)
  core: bump library/nginx from `ec4ed8b` to `b5a9a3c` in /website (#24146)
  core: bump github.com/pires/go-proxyproto from 0.14.0 to 0.15.0 (#24139)
  core: bump library/node from `ffc7838` to `715e55e` in /lifecycle/container (#24142)
  core: bump pnpm/pnpm from 11.12.0 to 11.13.0 in /lifecycle/container (#24144)
  core: bump library/golang from `ee5a795` to `3f1e064` in /lifecycle/container (#24143)
  core: bump pnpm/pnpm from 11.12.0 to 11.13.0 in /website (#24147)
  core: bump kubernetes from 36.0.2 to 36.0.3 (#24145)
  core: bump docker from 7.1.0 to 7.2.0 (#24149)
  web: bump webcomponent-qr-code from 1.3.0 to 2.0.0 in /web (#24152)
  core: bump regex from 1.12.4 to 1.13.0 (#24150)
  core: bump rust-toolchain from 1.97.0 to 1.97.1 (#24148)
  website/docs: cleanup 07-12: refresh contributor guidance (#23969)
  packages/ak-common/db: ignore empty passwords (#24127)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants