2022-12-20 14:42:19 +01:00
Feature : `osc linkpac` command
# common steps for all scenarios
Background :
Given I s e t w o r k i n g d i r e c t o r y t o " { c o n t e x t . o s c . t e m p } "
2024-07-01 09:31:14 +02:00
@destructive
Scenario : Run `osc linkpac`
When I e x e c u t e o s c w i t h a r g s " l i n k p a c t e s t : f a c t o r y / t e s t - p k g A h o m e : A d m i n "
Then t h e e x i t c o d e i s 0
And I e x e c u t e o s c w i t h a r g s " a p i / s o u r c e / h o m e : A d m i n / t e s t - p k g A / _ l i n k "
And s t d o u t c o n t a i n s " <link project=\"test:factory\" package=\"test-pkgA\"> "
@destructive
Scenario : Run `osc linkpac --disable-build`
When I e x e c u t e o s c w i t h a r g s " l i n k p a c t e s t : f a c t o r y / t e s t - p k g A h o m e : A d m i n - - d i s a b l e - b u i l d "
Then t h e e x i t c o d e i s 0
And I e x e c u t e o s c w i t h a r g s " a p i / s o u r c e / h o m e : A d m i n / t e s t - p k g A / _ l i n k "
And s t d o u t c o n t a i n s " <link project=\"test:factory\" package=\"test-pkgA\"> "
And I e x e c u t e o s c w i t h a r g s " a p i / s o u r c e / h o m e : A d m i n / t e s t - p k g A / _ m e t a "
And s t d o u t c o n t a i n s " <build> \ s * <disable/> \ s * </build> "
@destructive
Scenario : Run `osc linkpac --disable-publish`
When I e x e c u t e o s c w i t h a r g s " l i n k p a c t e s t : f a c t o r y / t e s t - p k g A h o m e : A d m i n - - d i s a b l e - p u b l i s h "
Then t h e e x i t c o d e i s 0
And I e x e c u t e o s c w i t h a r g s " a p i / s o u r c e / h o m e : A d m i n / t e s t - p k g A / _ l i n k "
And s t d o u t c o n t a i n s " <link project=\"test:factory\" package=\"test-pkgA\"> "
And I e x e c u t e o s c w i t h a r g s " a p i / s o u r c e / h o m e : A d m i n / t e s t - p k g A / _ m e t a "
And s t d o u t c o n t a i n s " <publish> \ s * <disable/> \ s * </publish> "
2022-12-20 14:42:19 +01:00
@destructive
2025-01-10 10:56:09 +01:00
Scenario : Run `osc linkpac` on a locked package
2022-12-20 14:42:19 +01:00
Given I e x e c u t e o s c w i t h a r g s " l o c k t e s t : f a c t o r y / t e s t - p k g A "
When I e x e c u t e o s c w i t h a r g s " l i n k p a c t e s t : f a c t o r y / t e s t - p k g A h o m e : A d m i n / t e s t - p k g A "
Then t h e e x i t c o d e i s 0
2024-11-29 15:49:20 +01:00
And I e x e c u t e o s c w i t h a r g s " a p i / s o u r c e / h o m e : A d m i n / t e s t - p k g A / _ m e t a "
And s t d o u t d o e s n ' t c o n t a i n " <lock> \ s * <enable/> \ s * </lock> "
2025-01-10 10:56:09 +01:00
@destructive
Scenario : Run `osc linkpac` with target project that has a project link
Given I e x e c u t e o s c w i t h a r g s " a p i - X P U T / s o u r c e / h o m e : A d m i n / _ m e t a - - d a t a = ' <project name="home:Admin"> <title/> <description/> <link project="test:factory"/> </project> ' "
When I e x e c u t e o s c w i t h a r g s " l i n k p a c t e s t : f a c t o r y / t e s t - p k g A h o m e : A d m i n "
Then t h e e x i t c o d e i s 0
And I e x e c u t e o s c w i t h a r g s " a p i / s o u r c e / h o m e : A d m i n / t e s t - p k g A / _ l i n k "
And s t d o u t c o n t a i n s " <link project=\"test:factory\" package=\"test-pkgA\"> "