Fixture is not executing __call__

Bug #1645868 reported by Lubosz Kosnik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.config
Won't Fix
Low
Unassigned

Bug Description

oslo config Fixture is not running __call__ on cfg.CONF in other sitatuation than in load_raw_values method.
Based on this using fixture and testing oslo policy code results with exception NotInitializedError.

Must be executed probably in __init__ or setup method.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

The timing for this is a little tricky. After ConfigOpts is initialized, it's not possible to add more command line options. Depending on how the fixture is going to be used, that may cause a problem with the test.

We could add a flag to the fixture's constructor telling it whether to initialize the ConfigOpts instance, but we would need to default to False for now.

Changed in oslo.config:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

It's safer to leave it up to the test code to invoke the fixture when it is ready.

Changed in oslo.config:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.