Page MenuHomekolab.org

Avoid relying on hardcoded tenant ids in tests
ClosedPublic

Authored by mollekopf on Aug 20 2021, 2:04 PM.

Details

Reviewers
machniak
Group Reviewers
Restricted Project
Commits
rK887e95d73397: Avoid relying on hardcoded tenant ids in tests

Diff Detail

Repository
rK kolab
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mollekopf requested review of this revision.Aug 20 2021, 2:04 PM
mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Aug 20 2021, 2:04 PM
machniak requested changes to this revision.Aug 25 2021, 1:15 PM
machniak added a subscriber: machniak.
machniak added inline comments.
src/tests/Feature/Controller/SkusTest.php
59–60

The intention of this tests (and most of other you modified) was to use non default tenant. I.e. something like Tenant::whereNotIn('id', [\config('app.tenant_id')])->first() might be more appropriate.

src/tests/Feature/TenantTest.php
42

Same here. We're testing for non-default tenant.

This revision now requires changes to proceed.Aug 25 2021, 1:15 PM
mollekopf updated this revision to Diff 8098.Aug 26 2021, 1:53 PM
mollekopf marked an inline comment as done.

Use the configured id instead of assuming a name

This revision was not accepted when it landed; it landed in state Needs Review.Aug 27 2021, 10:13 AM
This revision was automatically updated to reflect the committed changes.