@@ -27,30 +27,6 @@ def setup_method(self):
2727 def teardown_method (self ):
2828 self .oc_api .delete_project ()
2929
30- def test_local_template_inside_cluster (self ):
31- branch_to_test = "master"
32- expected_output = "Welcome to PHP"
33- if VERSION .startswith ("7.4" ) or VERSION .startswith ("8.0" ):
34- branch_to_test = "4.X"
35- expected_output = "Welcome to CakePHP 4"
36- if VERSION .startswith ("8.1" ) or VERSION .startswith ("8.2" ):
37- branch_to_test = "5.X"
38- expected_output = "Welcome to CakePHP 5"
39- template_json = "../openshift/templates/cakephp-mysql-persistent.json"
40- assert self .oc_api .deploy_template (
41- template = template_json , name_in_template = "cakephp-example" , expected_output = expected_output ,
42- openshift_args = [
43- f"SOURCE_REPOSITORY_REF={ branch_to_test } " ,
44- f"PHP_VERSION={ VERSION } " ,
45- "NAME=cakephp-example" ,
46- "MYSQL_VERSION=8.0-el8"
47- ]
48- )
49- assert self .oc_api .template_deployed (name_in_template = "cakephp-example" )
50- assert self .oc_api .check_response_inside_cluster (
51- name_in_template = "cakephp-example" , expected_output = expected_output
52- )
53-
5430 def test_remote_template_inside_cluster (self ):
5531 branch_to_test = "master"
5632 expected_output = "Welcome to PHP"
@@ -73,35 +49,7 @@ def test_remote_template_inside_cluster(self):
7349 "MYSQL_VERSION=8.0-el8"
7450 ]
7551 )
76- assert self .oc_api .template_deployed (name_in_template = "cakephp-example" )
52+ assert self .oc_api .is_template_deployed (name_in_template = "cakephp-example" )
7753 assert self .oc_api .check_response_inside_cluster (
7854 name_in_template = "cakephp-example" , expected_output = expected_output
7955 )
80-
81- def test_remote_template_by_request (self ):
82- branch_to_test = "master"
83- expected_output = "Welcome to PHP"
84- if VERSION .startswith ("7.4" ) or VERSION .startswith ("8.0" ):
85- branch_to_test = "4.X"
86- expected_output = "Welcome to CakePHP 4"
87- elif VERSION .startswith ("8.1" ) or VERSION .startswith ("8.2" ):
88- branch_to_test = "5.X"
89- expected_output = "Welcome to CakePHP 5"
90-
91- template_json = self .oc_api .get_raw_url_for_json (
92- container = "cakephp-ex" , branch = branch_to_test , dir = "openshift/templates" , filename = "cakephp-mysql-persistent.json"
93- )
94- assert self .oc_api .deploy_template (
95- template = template_json , name_in_template = "cakephp-example" , expected_output = expected_output ,
96- openshift_args = [
97- f"SOURCE_REPOSITORY_REF={ branch_to_test } " ,
98- f"PHP_VERSION={ VERSION } " ,
99- "NAME=cakephp-example" ,
100- "MYSQL_VERSION=8.0-el8"
101- ]
102- )
103- assert self .oc_api .template_deployed (name_in_template = "cakephp-example" )
104- assert self .oc_api .check_response_outside_cluster (
105- protocol = "https" ,
106- name_in_template = "cakephp-example" , expected_output = expected_output
107- )
0 commit comments