diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 7b8ecf1..7a8618d 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -6,16 +6,13 @@ on: ["push", "pull_request"] jobs: - - ubuntu20: - runs-on: ubuntu-20.04 + ubuntu22: + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v2.3.4 - - - name: Prepare run: sudo apt update && sudo apt install zfsutils-linux lzop pigz zstd gzip xz-utils lz4 mbuffer && sudo -H pip3 install coverage unittest2 mock==3.0.5 coveralls @@ -29,17 +26,15 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: coveralls --service=github || true - ubuntu18: - runs-on: ubuntu-18.04 + ubuntu20: + runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v2.3.4 - - - name: Prepare - run: sudo apt update && sudo apt install zfsutils-linux python3-setuptools lzop pigz zstd gzip xz-utils liblz4-tool mbuffer && sudo -H pip3 install coverage unittest2 mock==3.0.5 coveralls + run: sudo apt update && sudo apt install zfsutils-linux lzop pigz zstd gzip xz-utils lz4 mbuffer && sudo -H pip3 install coverage unittest2 mock==3.0.5 coveralls - name: Regression test @@ -51,8 +46,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: coveralls --service=github || true - ubuntu18_python2: - runs-on: ubuntu-18.04 + ubuntu20_python2: + runs-on: ubuntu-20.04 steps: - name: Checkout @@ -64,13 +59,16 @@ jobs: python-version: '2.x' - name: Prepare - run: sudo apt update && sudo apt install zfsutils-linux python-setuptools lzop pigz zstd gzip xz-utils liblz4-tool mbuffer && sudo -H pip install coverage unittest2 mock==3.0.5 coveralls colorama + run: sudo apt update && sudo apt install zfsutils-linux lzop pigz zstd gzip xz-utils lz4 mbuffer && sudo -H pip3 install coverage unittest2 mock==3.0.5 coveralls + - name: Regression test run: sudo -E ./tests/run_tests + - name: Coveralls env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: coveralls --service=github || true + + diff --git a/tests/test_zfsnode.py b/tests/test_zfsnode.py index 4cc1baf..f32216b 100644 --- a/tests/test_zfsnode.py +++ b/tests/test_zfsnode.py @@ -84,7 +84,7 @@ test_target1 with self.subTest("Test if all cmds are executed correctly (no failures)"): with OutputIO() as buf: with redirect_stdout(buf): - (selected_datasets, excluded_datasets) =node.selected_datasets(property_name="autobackup:test", exclude_paths=[], exclude_received=False, exclude_unchanged=False, min_change=1) + (selected_datasets, excluded_datasets) =node.selected_datasets(property_name="autobackup:test", exclude_paths=[], exclude_received=False, exclude_unchanged=0) node.consistent_snapshot(selected_datasets, "test-1", 0, pre_snapshot_cmds=["echo pre1", "echo pre2"], @@ -101,7 +101,7 @@ test_target1 with OutputIO() as buf: with redirect_stdout(buf): with self.assertRaises(ExecuteError): - (selected_datasets, excluded_datasets) =node.selected_datasets(property_name="autobackup:test", exclude_paths=[], exclude_received=False, exclude_unchanged=False, min_change=1) + (selected_datasets, excluded_datasets) =node.selected_datasets(property_name="autobackup:test", exclude_paths=[], exclude_received=False, exclude_unchanged=0) node.consistent_snapshot(selected_datasets, "test-1", 0, pre_snapshot_cmds=["echo pre1", "false", "echo pre2"], @@ -119,7 +119,7 @@ test_target1 with redirect_stdout(buf): with self.assertRaises(ExecuteError): #same snapshot name as before so it fails - (selected_datasets, excluded_datasets) =node.selected_datasets(property_name="autobackup:test", exclude_paths=[], exclude_received=False, exclude_unchanged=False, min_change=1) + (selected_datasets, excluded_datasets) =node.selected_datasets(property_name="autobackup:test", exclude_paths=[], exclude_received=False, exclude_unchanged=0) node.consistent_snapshot(selected_datasets, "test-1", 0, pre_snapshot_cmds=["echo pre1", "echo pre2"],