-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathtest_ocp_integration.py
More file actions
35 lines (25 loc) · 1.12 KB
/
test_ocp_integration.py
File metadata and controls
35 lines (25 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
import sys
from container_ci_suite.openshift import OpenShiftAPI
from container_ci_suite.utils import get_service_image, check_variables
if not check_variables():
print("At least one variable from IMAGE_NAME, OS, VERSION is missing.")
sys.exit(1)
VERSION = os.getenv("VERSION")
IMAGE_NAME = os.getenv("IMAGE_NAME")
class TestHTTPDIntegrationTemplate:
def setup_method(self):
self.template_name = get_service_image(IMAGE_NAME)
self.oc_api = OpenShiftAPI(pod_name_prefix=self.template_name, version=VERSION)
def teardown_method(self):
self.oc_api.delete_project()
def test_httpd_ex_template_inside_cluster(self):
assert self.oc_api.deploy_s2i_app(
image_name=IMAGE_NAME,
app=f"https://github.com/sclorg/httpd-container.git",
context="examples/sample-test-app"
)
assert self.oc_api.is_template_deployed(name_in_template=self.template_name)
assert self.oc_api.check_response_inside_cluster(
name_in_template=self.template_name, expected_output="This is a sample s2i application with static content"
)