Nov. 10th, 2009

wyntarvox: (Default)
[personal profile] wyntarvox
I'm working on t/console-changejournaltype.t One reason it fails is that the console command "change_journal_type" hasn't been updated to be WTF-friendly. This is fairly straightforward to fix, but there's another problem with it.

The can_execute sub for change_journal_type checks for either of two things: a) the user executing the command has the appropriate priv; OR b) $LJ::IS_DEV_SERVER is true. The test, however, only cares about whether the temp_user has the appropriate priv. When the test tries to have temp_user execute change_journal_type without the appropriate priv, it expects the command to error with an inappropriate priv error. However, because on my Dreamhack I have $LJ::IS_DEV_SERVER set to true, the command in fact succeeds which in turn causes the test to fail.

My question is, is it okay to set $LJ::IS_DEV_SERVER to false to get the tests to pass, or should they pass regardless (so we have to rework the tests, for example, to pass if temp_user has the appropriate priv or if $LJ::IS_DEV_SERVER is true)?

Profile

dw_dev: The word "develop" using the Swirly D logo.  (Default)
Dreamwidth Open Source Development

June 2025

S M T W T F S
1234567
89101112 1314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 14th, 2025 03:13 am
Powered by Dreamwidth Studios