test: move test_osbuild.py into module tests

Move the `test_osbuild.py` test into the module-test directory. This
test contains just a bunch of basic functionality tests for a selection
of osbuild modules. Hence, it can be run together with the other module
tests.
This commit is contained in:
David Rheinsberg 2020-05-28 08:58:34 +02:00
parent 3cf8b79e80
commit e8445da3d9
2 changed files with 10 additions and 29 deletions

View file

@ -14,14 +14,15 @@ jobs:
with:
run: make test-src
module:
module_tests:
name: "Module Unittests"
runs-on: ubuntu-latest
container: docker.io/library/python:3.7
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Run Module Unittests
- name: "Clone Repository"
uses: actions/checkout@v2
- name: "Run Module Unittests"
uses: osbuild/containers/ghci/actions/ghci-osbuild@ghci/v1
with:
run: make test-module
documentation:
@ -54,26 +55,6 @@ jobs:
test -d docs
test -f docs/osbuild.1
unit_tests:
name: "unit"
runs-on: ubuntu-latest
container:
image: docker.io/library/python:3.7
options: --privileged # Needed for bind mounts in unit tests
steps:
- name: Clone repository
uses: actions/checkout@v2
with:
path: osbuild
- name: Install Dependencies
run: pip install jsonschema
- name: Run test_osbuild
run: |
cd osbuild
python3 -m unittest -v test.test_osbuild
sample_validation:
name: "sample validation"
runs-on: ubuntu-latest

View file

@ -1,3 +1,7 @@
#
# Basic tests for a collection of osbuild modules.
#
import json
import os
import unittest
@ -224,7 +228,3 @@ class TestDescriptions(unittest.TestCase):
self.assertEqual(len(lst), 1) # missing "filename"
lst = res[".pipeline.assembler.options.compression"]
self.assertEqual(len(lst), 1) # wrong compression method
if __name__ == "__main__":
unittest.main()