19
19
20
20
TAGS = {
21
21
"rhel8" : "-el8" ,
22
- "rhel9" : "-el9"
22
+ "rhel9" : "-el9" ,
23
+ "rhel10" : "-el10"
23
24
}
24
25
TAG = TAGS .get (OS , None )
25
26
IMAGE_SHORT = f"postgresql:12{ TAG } "
29
30
class TestS2IRailsExTemplate :
30
31
31
32
def setup_method (self ):
32
- self .oc_api = OpenShiftAPI (pod_name_prefix = "ruby-testing" , version = VERSION )
33
- assert self .oc_api .upload_image (DEPLOYED_PGSQL_IMAGE , IMAGE_SHORT )
33
+ self .oc_api = OpenShiftAPI (pod_name_prefix = "ruby-testing" , version = VERSION , shared_cluster = True )
34
34
35
35
def teardown_method (self ):
36
36
self .oc_api .delete_project ()
@@ -43,6 +43,12 @@ def teardown_method(self):
43
43
]
44
44
)
45
45
def test_rails_template_inside_cluster (self , template ):
46
+ if OS == "rhel10" :
47
+ pytest .skip ("Do NOT test on RHEL10." )
48
+ if self .oc_api .shared_cluster :
49
+ assert self .oc_api .upload_image_to_external_registry (DEPLOYED_PGSQL_IMAGE , IMAGE_SHORT )
50
+ else :
51
+ assert self .oc_api .upload_image (DEPLOYED_PGSQL_IMAGE , IMAGE_SHORT )
46
52
service_name = "ruby-testing"
47
53
rails_ex_branch = "master"
48
54
if VERSION == "3.3" :
@@ -54,7 +60,8 @@ def test_rails_template_inside_cluster(self, template):
54
60
f"SOURCE_REPOSITORY_URL=https://github.com/sclorg/rails-ex.git" ,
55
61
f"SOURCE_REPOSITORY_REF={ rails_ex_branch } " ,
56
62
f"RUBY_VERSION={ VERSION } " ,
57
- f"NAME={ service_name } "
63
+ f"NAME={ service_name } " ,
64
+ "MEMORY_LIMIT=1Gi" ,
58
65
]
59
66
if template != "rails.json" :
60
67
openshift_args = [
0 commit comments