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:
parent
3cf8b79e80
commit
e8445da3d9
2 changed files with 10 additions and 29 deletions
31
.github/workflows/tests.yml
vendored
31
.github/workflows/tests.yml
vendored
|
|
@ -14,14 +14,15 @@ jobs:
|
||||||
with:
|
with:
|
||||||
run: make test-src
|
run: make test-src
|
||||||
|
|
||||||
module:
|
module_tests:
|
||||||
name: "Module Unittests"
|
name: "Module Unittests"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: docker.io/library/python:3.7
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repository
|
- name: "Clone Repository"
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Run Module Unittests
|
- name: "Run Module Unittests"
|
||||||
|
uses: osbuild/containers/ghci/actions/ghci-osbuild@ghci/v1
|
||||||
|
with:
|
||||||
run: make test-module
|
run: make test-module
|
||||||
|
|
||||||
documentation:
|
documentation:
|
||||||
|
|
@ -54,26 +55,6 @@ jobs:
|
||||||
test -d docs
|
test -d docs
|
||||||
test -f docs/osbuild.1
|
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:
|
sample_validation:
|
||||||
name: "sample validation"
|
name: "sample validation"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
#
|
||||||
|
# Basic tests for a collection of osbuild modules.
|
||||||
|
#
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
|
|
@ -224,7 +228,3 @@ class TestDescriptions(unittest.TestCase):
|
||||||
self.assertEqual(len(lst), 1) # missing "filename"
|
self.assertEqual(len(lst), 1) # missing "filename"
|
||||||
lst = res[".pipeline.assembler.options.compression"]
|
lst = res[".pipeline.assembler.options.compression"]
|
||||||
self.assertEqual(len(lst), 1) # wrong compression method
|
self.assertEqual(len(lst), 1) # wrong compression method
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
unittest.main()
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue