Page MenuHomePhorge

Avoid relying on hardcoded tenant ids in tests
ClosedPublic

Authored by mollekopf on Aug 20 2021, 2:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 29, 7:08 AM
Unknown Object (File)
Feb 24 2024, 2:19 PM
Unknown Object (File)
Feb 22 2024, 4:20 PM
Unknown Object (File)
Feb 21 2024, 2:19 PM
Unknown Object (File)
Jan 24 2024, 2:17 PM
Unknown Object (File)
Jan 24 2024, 2:15 PM
Unknown Object (File)
Jan 24 2024, 2:13 PM
Unknown Object (File)
Jan 24 2024, 1:05 PM
Subscribers

Details

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

Diff Detail

Repository
rK kolab
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 36310
Build 14350: arc lint + arc unit

Event Timeline

mollekopf created this revision.
mollekopf added a reviewer: Restricted Project.Aug 20 2021, 2:04 PM
machniak subscribed.
machniak added inline comments.
src/tests/Feature/Controller/SkusTest.php
59

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 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.