@@ -79,3 +79,67 @@ def test_crud_with_config():
7979 olm .deleteSubscription (dynClient , namespace , "ibm-sls" )
8080 olm .deleteSubscription (dynClient , namespace , "ibm-truststore-mgr" )
8181 ocp .deleteNamespace (dynClient , namespace )
82+
83+
84+ def test_crud_with_manual_approval ():
85+ namespace = "cli-fvt-3"
86+ subscription = olm .applySubscription (
87+ dynClient ,
88+ namespace ,
89+ "ibm-sls" ,
90+ packageChannel = "3.x" ,
91+ installPlanApproval = "Manual"
92+ )
93+ assert subscription .metadata .name == "ibm-sls"
94+ assert subscription .metadata .namespace == namespace
95+ assert subscription .spec .installPlanApproval == "Manual"
96+
97+ # When we install the ibm-sls subscription OLM will automatically create the ibm-truststore-mgr
98+ # subscription, but when we delete the subscription, OLM will not automatically remove the latter
99+ olm .deleteSubscription (dynClient , namespace , "ibm-sls" )
100+ olm .deleteSubscription (dynClient , namespace , "ibm-truststore-mgr" )
101+ ocp .deleteNamespace (dynClient , namespace )
102+
103+
104+ def test_crud_with_starting_csv ():
105+ namespace = "cli-fvt-4"
106+ # Note: This test assumes a specific CSV version exists in the catalog
107+ # You may need to adjust the version based on what's available
108+ subscription = olm .applySubscription (
109+ dynClient ,
110+ namespace ,
111+ "ibm-sls" ,
112+ packageChannel = "3.x" ,
113+ startingCSV = "ibm-sls.v3.8.0"
114+ )
115+ assert subscription .metadata .name == "ibm-sls"
116+ assert subscription .metadata .namespace == namespace
117+ assert subscription .spec .startingCSV == "ibm-sls.v3.8.0"
118+
119+ # When we install the ibm-sls subscription OLM will automatically create the ibm-truststore-mgr
120+ # subscription, but when we delete the subscription, OLM will not automatically remove the latter
121+ olm .deleteSubscription (dynClient , namespace , "ibm-sls" )
122+ olm .deleteSubscription (dynClient , namespace , "ibm-truststore-mgr" )
123+ ocp .deleteNamespace (dynClient , namespace )
124+
125+
126+ def test_crud_with_manual_approval_and_starting_csv ():
127+ namespace = "cli-fvt-5"
128+ subscription = olm .applySubscription (
129+ dynClient ,
130+ namespace ,
131+ "ibm-sls" ,
132+ packageChannel = "3.x" ,
133+ installPlanApproval = "Manual" ,
134+ startingCSV = "ibm-sls.v3.8.0"
135+ )
136+ assert subscription .metadata .name == "ibm-sls"
137+ assert subscription .metadata .namespace == namespace
138+ assert subscription .spec .installPlanApproval == "Manual"
139+ assert subscription .spec .startingCSV == "ibm-sls.v3.8.0"
140+
141+ # When we install the ibm-sls subscription OLM will automatically create the ibm-truststore-mgr
142+ # subscription, but when we delete the subscription, OLM will not automatically remove the latter
143+ olm .deleteSubscription (dynClient , namespace , "ibm-sls" )
144+ olm .deleteSubscription (dynClient , namespace , "ibm-truststore-mgr" )
145+ ocp .deleteNamespace (dynClient , namespace )
0 commit comments