If there is a file .kiwi.package_manager.env in the root of the image tree it will be read and put into the caller environment for the selected package and repository manager. There are features in e.g zypper which can only be used via env variables. This Fixes bsc#1235448
19 lines
437 B
Python
19 lines
437 B
Python
from pytest import raises
|
|
import os
|
|
|
|
from kiwi.utils.toenv import ToEnv
|
|
from kiwi.exceptions import KiwiEnvImportError
|
|
|
|
|
|
class TestToEnv(object):
|
|
def setup(self):
|
|
ToEnv('../data', 'some.env')
|
|
assert os.environ['ZYPP_MODALIAS_SYSFS'] == ''
|
|
|
|
def setup_method(self, cls):
|
|
self.setup()
|
|
|
|
def test_setup_raises(self):
|
|
with raises(KiwiEnvImportError):
|
|
ToEnv('../data', 'some_broken.env')
|