Skip to content

Commit 8c2336d

Browse files
authored
Merge pull request openSUSE#1934 from dmach/new-git-metadata-store
New git metadata store
2 parents 9dbd333 + 0eb0fc5 commit 8c2336d

21 files changed

+1543
-433
lines changed

behave/features/git-osc-precommit-hook.feature

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ Background:
88
And I execute git-obs with args "repo clone Admin/test-GitPkgA --no-ssh-strict-host-key-checking"
99
And I set working directory to "{context.osc.temp}/test-GitPkgA"
1010
And I execute "sed -i 's@^\(Version: *\) .*@\1 v1.1@' *.spec"
11-
# running precommit services has a hard coded query, so openSUSE:Factory needs to exist
12-
And I execute osc with args "api -X PUT '/source/openSUSE:Factory/_meta' -d '<project name="openSUSE:Factory"><title></title><description></description></project>'"
11+
And I execute git-obs with args "meta set --apiurl='https://localhost:{context.podman.container.ports[obs_https]}' --project=test:factory"
1312

1413

1514
@destructive

behave/features/git-repo-clone.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Scenario: Clone and build with non-default origin
3333
Then the exit code is 0
3434
When I set working directory to "{context.osc.temp}/test-GitPkgA"
3535
And I execute "git remote rename origin myorigin"
36+
And I execute git-obs with args "meta set --apiurl='https://localhost:{context.podman.container.ports[obs_https]}' --project=foo"
3637
And I execute osc with args "build --just-print-buildroot --alternative-project test:factory"
3738
Then the exit code is 0
3839

Lines changed: 312 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,312 @@
1+
Feature: Osc commands that do not support git
2+
3+
4+
Background:
5+
Given I set working directory to "{context.osc.temp}"
6+
And I execute "git init -b factory"
7+
And I execute git-obs with args "meta set --apiurl='https://localhost:{context.podman.container.ports[obs_https]}' --project=test:factory --package=new-package"
8+
9+
10+
Scenario: Run 'osc add'
11+
Given I create file "{context.osc.temp}/new-file" with perms "0644"
12+
"""
13+
"""
14+
When I execute osc with args "add new-file"
15+
Then the exit code is 1
16+
And stderr is
17+
"""
18+
Command 'osc add' is not supported with git. Use 'git add' instead.
19+
"""
20+
21+
22+
Scenario: Run 'osc addremove'
23+
When I execute osc with args "addremove"
24+
Then the exit code is 1
25+
And stderr is
26+
"""
27+
Command 'osc addremove' is not supported with git. Use 'git add' and 'git rm' instead.
28+
"""
29+
30+
31+
Scenario: Run 'osc branch'
32+
When I execute osc with args "branch"
33+
Then the exit code is 1
34+
And stderr is
35+
"""
36+
Command 'osc branch' is not supported with git. Use 'osc fork' or 'git-obs repo fork' instead.
37+
"""
38+
39+
40+
Scenario: Run 'osc checkout' to checkout a package in a git project
41+
# turn the git repo into a project
42+
Given I create file "{context.osc.temp}/_manifest" with perms "0644"
43+
"""
44+
"""
45+
And I execute git-obs with args "meta set --package="
46+
When I execute osc with args "checkout package"
47+
Then the exit code is 1
48+
And stderr is
49+
"""
50+
Command 'osc checkout' is not supported with git. Use 'git-obs repo clone' instead.
51+
"""
52+
53+
54+
Scenario: Run 'osc clean'
55+
When I execute osc with args "clean"
56+
Then the exit code is 1
57+
And stderr is
58+
"""
59+
Command 'osc clean' is not supported with git. Use 'git reset' instead.
60+
"""
61+
62+
63+
Scenario: Run 'osc commit'
64+
When I execute osc with args "commit"
65+
Then the exit code is 1
66+
And stderr is
67+
"""
68+
Command 'osc commit' is not supported with git. Use 'git commit' and 'git push' instead.
69+
"""
70+
71+
72+
Scenario: Run 'osc delete'
73+
When I execute osc with args "delete"
74+
Then the exit code is 1
75+
And stderr is
76+
"""
77+
Command 'osc delete' is not supported with git. Use 'git rm' instead.
78+
"""
79+
80+
81+
Scenario: Run 'osc deleterequest'
82+
When I execute osc with args "deleterequest"
83+
Then the exit code is 1
84+
And stderr is
85+
"""
86+
Command 'osc deleterequest' is not supported with git.
87+
"""
88+
89+
90+
Scenario: Run 'osc develproject'
91+
When I execute osc with args "develproject"
92+
Then the exit code is 1
93+
And stderr is
94+
"""
95+
Command 'osc develproject' is not supported with git.
96+
"""
97+
98+
99+
Scenario: Run 'osc diff'
100+
When I execute osc with args "diff"
101+
Then the exit code is 1
102+
And stderr is
103+
"""
104+
Command 'osc diff' is not supported with git. Use 'git diff' instead.
105+
"""
106+
107+
108+
Scenario: Run 'osc importsrcpkg'
109+
When I execute osc with args "importsrcpkg package.src.rpm"
110+
Then the exit code is 1
111+
And stderr is
112+
"""
113+
Command 'osc importsrcpkg' is not supported with git.
114+
"""
115+
116+
117+
Scenario: Run 'osc init'
118+
When I execute osc with args "init test:factory"
119+
Then the exit code is 1
120+
And stderr is
121+
"""
122+
Command 'osc init' is not supported with git.
123+
"""
124+
125+
126+
Scenario: Run 'osc linkpac'
127+
When I execute osc with args "linkpac"
128+
Then the exit code is 1
129+
And stderr is
130+
"""
131+
Command 'osc linkpac' is not supported with git.
132+
"""
133+
134+
135+
Scenario: Run 'osc linktobranch'
136+
When I execute osc with args "linktobranch"
137+
Then the exit code is 1
138+
And stderr is
139+
"""
140+
Command 'osc linktobranch' is not supported with git.
141+
"""
142+
143+
144+
Scenario: Run 'osc log'
145+
When I execute osc with args "log"
146+
Then the exit code is 1
147+
And stderr is
148+
"""
149+
Command 'osc log' is not supported with git.
150+
"""
151+
152+
153+
Scenario: Run 'osc maintainer'
154+
When I execute osc with args "maintainer"
155+
Then the exit code is 1
156+
And stderr is
157+
"""
158+
Command 'osc maintainer' is not supported with git.
159+
"""
160+
161+
162+
Scenario: Run 'osc maintenancerequest'
163+
When I execute osc with args "maintenancerequest"
164+
Then the exit code is 1
165+
And stderr is
166+
"""
167+
Command 'osc maintenancerequest' is not supported with git.
168+
"""
169+
170+
171+
Scenario: Run 'osc mkpac'
172+
When I execute osc with args "mkpac"
173+
Then the exit code is 1
174+
And stderr is
175+
"""
176+
Command 'osc mkpac' is not supported with git. Add a submodule with a package instead.
177+
"""
178+
179+
180+
Scenario: Run 'osc mv'
181+
When I execute osc with args "mv old-file new-file"
182+
Then the exit code is 1
183+
And stderr is
184+
"""
185+
Command 'osc mv' is not supported with git. Use 'git mv' instead.
186+
"""
187+
188+
189+
Scenario: Run 'osc pdiff'
190+
When I execute osc with args "pdiff"
191+
Then the exit code is 1
192+
And stderr is
193+
"""
194+
Command 'osc pdiff' is not supported with git.
195+
"""
196+
197+
198+
Scenario: Run 'osc pull'
199+
When I execute osc with args "pull"
200+
Then the exit code is 1
201+
And stderr is
202+
"""
203+
Command 'osc pull' is not supported with git. Use 'git fetch' and 'git rebase' instead.
204+
"""
205+
206+
207+
Scenario: Run 'osc releaserequest'
208+
When I execute osc with args "releaserequest"
209+
Then the exit code is 1
210+
And stderr is
211+
"""
212+
Command 'osc releaserequest' is not supported with git.
213+
"""
214+
215+
216+
Scenario: Run 'osc repairlink'
217+
When I execute osc with args "repairlink"
218+
Then the exit code is 1
219+
And stderr is
220+
"""
221+
Command 'osc repairlink' is not supported with git.
222+
"""
223+
224+
225+
Scenario: Run 'osc repairwc'
226+
When I execute osc with args "repairwc"
227+
Then the exit code is 1
228+
And stderr is
229+
"""
230+
Command 'osc repairwc' is not supported with git.
231+
"""
232+
233+
234+
Scenario: Run 'osc requestmaintainership'
235+
When I execute osc with args "requestmaintainership"
236+
Then the exit code is 1
237+
And stderr is
238+
"""
239+
Command 'osc requestmaintainership' is not supported with git.
240+
"""
241+
242+
243+
Scenario: Run 'osc resolved'
244+
When I execute osc with args "resolved"
245+
Then the exit code is 1
246+
And stderr is
247+
"""
248+
Command 'osc resolved' is not supported with git.
249+
"""
250+
251+
252+
Scenario: Run 'osc revert'
253+
When I execute osc with args "revert changed-file"
254+
Then the exit code is 1
255+
And stderr is
256+
"""
257+
Command 'osc revert' is not supported with git. Use 'git checkout' instead.
258+
"""
259+
260+
261+
Scenario: Run 'osc setdevelproject'
262+
When I execute osc with args "setdevelproject"
263+
Then the exit code is 1
264+
And stderr is
265+
"""
266+
Command 'osc setdevelproject' is not supported with git.
267+
"""
268+
269+
270+
Scenario: Run 'osc setlinkrev'
271+
When I execute osc with args "setlinkrev"
272+
Then the exit code is 1
273+
And stderr is
274+
"""
275+
Command 'osc setlinkrev' is not supported with git.
276+
"""
277+
278+
279+
Scenario: Run 'osc status'
280+
When I execute osc with args "status"
281+
Then the exit code is 1
282+
And stderr is
283+
"""
284+
Command 'osc status' is not supported with git. User 'git status' instead.
285+
"""
286+
287+
288+
Scenario: Run 'osc submitrequest'
289+
When I execute osc with args "submitrequest"
290+
Then the exit code is 1
291+
And stderr is
292+
"""
293+
Command 'osc submitrequest' is not supported with git. Use 'git-obs pr create' instead.
294+
"""
295+
296+
297+
Scenario: Run 'osc update'
298+
When I execute osc with args "update"
299+
Then the exit code is 1
300+
And stderr is
301+
"""
302+
Command 'osc update' is not supported with git.
303+
"""
304+
305+
306+
Scenario: Run 'osc updatepacmetafromspec'
307+
When I execute osc with args "updatepacmetafromspec"
308+
Then the exit code is 1
309+
And stderr is
310+
"""
311+
Command 'osc updatepacmetafromspec' is not supported with git.
312+
"""

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,5 @@
110110
man_pages = [
111111
("oscrc", "oscrc", "openSUSE Commander configuration file", "openSUSE project <[email protected]>", 5),
112112
("git-obs-quickstart", "git-obs-quickstart", "git-obs Quickstart", "openSUSE project <[email protected]>", 1),
113+
("git-obs-metadata", "git-obs-metadata", "git-obs Metadata", "openSUSE project <[email protected]>", 1),
113114
]

0 commit comments

Comments
 (0)