osclib/cache: provide osrt.cache.disable config option to disable cache.
Necessary for writing involved tests since the assumptions made by the cache are violated and thus cause problems. To keep the tests passing the oscrc intended to be used must be set as environment variable so when osclib.conf.Config is use the config is not lost. This would be made simpler without the needless extra config added by StagingWorkflow.
This commit is contained in:
@@ -90,6 +90,7 @@ class TestCase(unittest.TestCase):
|
||||
conf.get_config(override_conffile=OSCRC,
|
||||
override_no_keyring=True,
|
||||
override_no_gnome_keyring=True)
|
||||
os.environ['OSC_CONFIG'] = OSCRC
|
||||
|
||||
def execute_script(self, args):
|
||||
if self.script:
|
||||
@@ -159,6 +160,8 @@ class StagingWorkflow(object):
|
||||
osc.core.conf.get_config(override_conffile=oscrc,
|
||||
override_no_keyring=True,
|
||||
override_no_gnome_keyring=True)
|
||||
os.environ['OSC_CONFIG'] = oscrc
|
||||
|
||||
if os.environ.get('OSC_DEBUG'):
|
||||
osc.core.conf.config['debug'] = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user