Skip to content

Commit

Permalink
ci: add gdisk verification tests
Browse files Browse the repository at this point in the history
  • Loading branch information
swysocki committed Aug 2, 2022
1 parent 292b72a commit 091b1e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
python-version: "3.8"
- name: Install dependencies
run: |
apt-get update && apt-get install -y fdisk jq
apt-get update && apt-get install -y fdisk jq gdisk
python -m pip install --upgrade pip
pip install flake8 pytest mypy
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
Expand All @@ -37,4 +37,4 @@ jobs:
mypy gpt_image --strict
- name: Test with pytest
run: |
pytest
pytest
6 changes: 6 additions & 0 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ def create_image(tmp_path):

@pytest.mark.skipif(sys.platform != "linux", reason="requires linux to run")
@pytest.mark.skipif(shutil.which("sfdisk") is None, reason="requires sfdisk utility")
@pytest.mark.skipif(shutil.which("sgdisk") is None, reason="requires sgdisk utility")
def test_sfdisk(create_image):
sfdisk = shutil.which("sfdisk")
sgdisk = shutil.which("sgdisk")
result = subprocess.run(
[sgdisk, "-v", create_image], capture_output=True, text=True
)
assert "no problems found" in (result.stdout).lower()
result = subprocess.run(
[sfdisk, "--json", create_image], capture_output=True, text=True
)
Expand Down

0 comments on commit 091b1e0

Please sign in to comment.