containers / udica

This repository contains a tool for generating SELinux security profiles for containers
GNU General Public License v3.0
478 stars 47 forks source link

Create Makefile and refactor tests #48

Closed JAORMX closed 4 years ago

JAORMX commented 4 years ago

This creates a very basic Makefile and refactors the tests so they can be ran from the top level directory.

The tests have also been separated into unit tests and integration tests.

The unit tests are what is still being ran on CI, and is what's called from the "test" target in the makefile.

The integration tests can be called directly from the module. e.g. python3 tests/test_integration.py, and this will actually require the python SELinux packages to be installed, as well as the udica python package itself (given that we would be testing integration). Currently it runs the same tests as the unit tests, but it can be extended in the future.

JAORMX commented 4 years ago

Even if travis is passing, this is still missing work. As you can't now run with the tests with selinux enabled in this state.

bachradsusi commented 4 years ago

Out of curiosity, what's the Makefile good for?

JAORMX commented 4 years ago

@bachradsusi by itself the makefile doesn't provide a lot of value. It's just a central place to call your testing/building. The plan is to start expanding it with lint tests and docker image builds.

wrabcak commented 4 years ago

LGTM. Merging.

Thanks! Lukas.