mvo5 / unattended-upgrades

Automatic installation of security upgrades on apt based systems
GNU General Public License v2.0
278 stars 78 forks source link

test: add TestBase.make_fake_aptroot() and use in tests #328

Closed mvo5 closed 2 years ago

mvo5 commented 2 years ago

The new TestBase.make_fake_aptroot() will create a fake aptroot based on an exiting template. It will also create a fake dpkg inside it that just writes what arguments got passed to it.

This ensures that the local git tree is not polluted with generated files during the test runs.

Use the new helper in the tests that use a fake root directory.