Skip to content

Commit 735bab7

Browse files
authored
Merge pull request openSUSE#1615 from dmach/fix-behave-repairwc
Fix behave test for repairwc command
2 parents f634c9f + e19f1bb commit 735bab7

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

.github/workflows/tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
pip3 config set global.break-system-packages 1
3939
pip3 install -e .
40-
python3 setup.py test
40+
python3 -m unittest
4141
4242
unit:
4343
name: "unit"
@@ -109,7 +109,7 @@ jobs:
109109
run: |
110110
pip3 config set global.break-system-packages 1
111111
pip3 install -e .
112-
python3 setup.py test
112+
python3 -m unittest
113113
114114
- name: 'Generate coverage reports (openSUSE Tumbleweed)'
115115
if: ${{ contains(matrix.container, '/opensuse/tumbleweed') }}

behave/features/repairwc.feature

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ Scenario: Run `osc repairwc` on a project without .osc/_osclib_version
1717
And I set working directory to "{context.osc.temp}/test:factory"
1818
And I remove file "{context.osc.temp}/test:factory/.osc/_osclib_version"
1919
When I execute osc with args "status"
20-
Then the exit code is 0
21-
And file "{context.osc.temp}/test:factory/.osc/_osclib_version" does not exist
22-
When I execute osc with args "repairwc"
23-
Then the exit code is 0
24-
When I execute osc with args "status"
20+
# assume store version 1.0 for a project
2521
Then the exit code is 0
2622
And file "{context.osc.temp}/test:factory/.osc/_osclib_version" exists
2723

@@ -45,7 +41,5 @@ Scenario: Run `osc repairwc` on a package without .osc/_osclib_version
4541
Then the exit code is 1
4642
And file "{context.osc.temp}/test:factory/test-pkgA/.osc/_osclib_version" does not exist
4743
When I execute osc with args "repairwc"
48-
Then the exit code is 0
49-
When I execute osc with args "status"
50-
Then the exit code is 0
51-
And file "{context.osc.temp}/test:factory/test-pkgA/.osc/_osclib_version" exists
44+
# no assumption about the store version for a package
45+
Then the exit code is 1

contrib/osc.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ install -Dm0644 oscrc.5 %{buildroot}%{_mandir}/man5/oscrc.5
192192
%python3_fix_shebang
193193

194194
%check
195-
%{use_python} setup.py test
195+
%{use_python} -m unittest
196196

197197
%files
198198
%defattr(-,root,root,-)

0 commit comments

Comments
 (0)