Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix behave test for repairwc command #1615

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: |
pip3 config set global.break-system-packages 1
pip3 install -e .
python3 setup.py test
python3 -m unittest

unit:
name: "unit"
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
run: |
pip3 config set global.break-system-packages 1
pip3 install -e .
python3 setup.py test
python3 -m unittest

- name: 'Generate coverage reports (openSUSE Tumbleweed)'
if: ${{ contains(matrix.container, '/opensuse/tumbleweed') }}
Expand Down
12 changes: 3 additions & 9 deletions behave/features/repairwc.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ Scenario: Run `osc repairwc` on a project without .osc/_osclib_version
And I set working directory to "{context.osc.temp}/test:factory"
And I remove file "{context.osc.temp}/test:factory/.osc/_osclib_version"
When I execute osc with args "status"
Then the exit code is 0
And file "{context.osc.temp}/test:factory/.osc/_osclib_version" does not exist
When I execute osc with args "repairwc"
Then the exit code is 0
When I execute osc with args "status"
# assume store version 1.0 for a project
Then the exit code is 0
And file "{context.osc.temp}/test:factory/.osc/_osclib_version" exists

Expand All @@ -45,7 +41,5 @@ Scenario: Run `osc repairwc` on a package without .osc/_osclib_version
Then the exit code is 1
And file "{context.osc.temp}/test:factory/test-pkgA/.osc/_osclib_version" does not exist
When I execute osc with args "repairwc"
Then the exit code is 0
When I execute osc with args "status"
Then the exit code is 0
And file "{context.osc.temp}/test:factory/test-pkgA/.osc/_osclib_version" exists
# no assumption about the store version for a package
Then the exit code is 1
2 changes: 1 addition & 1 deletion contrib/osc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ install -Dm0644 oscrc.5 %{buildroot}%{_mandir}/man5/oscrc.5
%python3_fix_shebang

%check
%{use_python} setup.py test
%{use_python} -m unittest

%files
%defattr(-,root,root,-)
Expand Down
Loading