diff --git a/7.3/test/conftest.py b/7.3/test/conftest.py new file mode 120000 index 000000000..3f2d78400 --- /dev/null +++ b/7.3/test/conftest.py @@ -0,0 +1 @@ +../../test/conftest.py \ No newline at end of file diff --git a/7.3/test/constants.py b/7.3/test/constants.py deleted file mode 120000 index 360f725b2..000000000 --- a/7.3/test/constants.py +++ /dev/null @@ -1 +0,0 @@ -../../test/constants.py \ No newline at end of file diff --git a/7.3/test/run-pytest b/7.3/test/run-pytest new file mode 120000 index 000000000..efe32b484 --- /dev/null +++ b/7.3/test/run-pytest @@ -0,0 +1 @@ +../../test/run-pytest \ No newline at end of file diff --git a/7.3/test/test_container_application.py b/7.3/test/test_container_application.py new file mode 120000 index 000000000..25c1c1ece --- /dev/null +++ b/7.3/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/7.3/test/test_container_basics.py b/7.3/test/test_container_basics.py new file mode 120000 index 000000000..b85dc1397 --- /dev/null +++ b/7.3/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/7.3/test/test_container_ssl.py b/7.3/test/test_container_ssl.py new file mode 120000 index 000000000..4257c4642 --- /dev/null +++ b/7.3/test/test_container_ssl.py @@ -0,0 +1 @@ +../../test/test_container_ssl.py \ No newline at end of file diff --git a/7.3/test/test_ocp_php_deploy_templates.py b/7.3/test/test_ocp_php_deploy_templates.py new file mode 120000 index 000000000..986c85f30 --- /dev/null +++ b/7.3/test/test_ocp_php_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_php_deploy_templates.py \ No newline at end of file diff --git a/7.3/test/test_ocp_php_latest_imagestreams.py b/7.3/test/test_ocp_php_latest_imagestreams.py new file mode 120000 index 000000000..26e4c91c8 --- /dev/null +++ b/7.3/test/test_ocp_php_latest_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_latest_imagestreams.py \ No newline at end of file diff --git a/7.3/test/test_ocp_php_s2i_imagestreams.py b/7.3/test/test_ocp_php_s2i_imagestreams.py new file mode 120000 index 000000000..a4a14529a --- /dev/null +++ b/7.3/test/test_ocp_php_s2i_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_imagestreams.py \ No newline at end of file diff --git a/7.3/test/test_ocp_php_s2i_integration.py b/7.3/test/test_ocp_php_s2i_integration.py new file mode 120000 index 000000000..b80ef5aef --- /dev/null +++ b/7.3/test/test_ocp_php_s2i_integration.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_integration.py \ No newline at end of file diff --git a/7.3/test/test_ocp_shared_helm_cakephp_application.py b/7.3/test/test_ocp_shared_helm_cakephp_application.py new file mode 120000 index 000000000..0e3fc630f --- /dev/null +++ b/7.3/test/test_ocp_shared_helm_cakephp_application.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_cakephp_application.py \ No newline at end of file diff --git a/7.3/test/test_ocp_shared_helm_chart_imagestreams.py b/7.3/test/test_ocp_shared_helm_chart_imagestreams.py new file mode 120000 index 000000000..45defea80 --- /dev/null +++ b/7.3/test/test_ocp_shared_helm_chart_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_chart_imagestreams.py \ No newline at end of file diff --git a/7.3/test/test_php_deploy_templates.py b/7.3/test/test_php_deploy_templates.py deleted file mode 120000 index 092efcb71..000000000 --- a/7.3/test/test_php_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_deploy_templates.py \ No newline at end of file diff --git a/7.3/test/test_php_latest_imagestreams.py b/7.3/test/test_php_latest_imagestreams.py deleted file mode 120000 index b4384d6a0..000000000 --- a/7.3/test/test_php_latest_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_latest_imagestreams.py \ No newline at end of file diff --git a/7.3/test/test_php_s2i_imagestreams.py b/7.3/test/test_php_s2i_imagestreams.py deleted file mode 120000 index acb01691f..000000000 --- a/7.3/test/test_php_s2i_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_imagestreams.py \ No newline at end of file diff --git a/7.3/test/test_php_s2i_integration.py b/7.3/test/test_php_s2i_integration.py deleted file mode 120000 index 68fa032e0..000000000 --- a/7.3/test/test_php_s2i_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_integration.py \ No newline at end of file diff --git a/7.4/test/conftest.py b/7.4/test/conftest.py new file mode 120000 index 000000000..3f2d78400 --- /dev/null +++ b/7.4/test/conftest.py @@ -0,0 +1 @@ +../../test/conftest.py \ No newline at end of file diff --git a/7.4/test/run-pytest b/7.4/test/run-pytest new file mode 120000 index 000000000..efe32b484 --- /dev/null +++ b/7.4/test/run-pytest @@ -0,0 +1 @@ +../../test/run-pytest \ No newline at end of file diff --git a/7.4/test/test_container_application.py b/7.4/test/test_container_application.py new file mode 120000 index 000000000..25c1c1ece --- /dev/null +++ b/7.4/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/7.4/test/test_container_basics.py b/7.4/test/test_container_basics.py new file mode 120000 index 000000000..b85dc1397 --- /dev/null +++ b/7.4/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/7.4/test/test_container_ssl.py b/7.4/test/test_container_ssl.py new file mode 120000 index 000000000..4257c4642 --- /dev/null +++ b/7.4/test/test_container_ssl.py @@ -0,0 +1 @@ +../../test/test_container_ssl.py \ No newline at end of file diff --git a/7.4/test/test_ocp_php_deploy_templates.py b/7.4/test/test_ocp_php_deploy_templates.py new file mode 120000 index 000000000..986c85f30 --- /dev/null +++ b/7.4/test/test_ocp_php_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_php_deploy_templates.py \ No newline at end of file diff --git a/7.4/test/test_ocp_php_latest_imagestreams.py b/7.4/test/test_ocp_php_latest_imagestreams.py new file mode 120000 index 000000000..26e4c91c8 --- /dev/null +++ b/7.4/test/test_ocp_php_latest_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_latest_imagestreams.py \ No newline at end of file diff --git a/7.4/test/test_ocp_php_s2i_imagestreams.py b/7.4/test/test_ocp_php_s2i_imagestreams.py new file mode 120000 index 000000000..a4a14529a --- /dev/null +++ b/7.4/test/test_ocp_php_s2i_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_imagestreams.py \ No newline at end of file diff --git a/7.4/test/test_ocp_php_s2i_integration.py b/7.4/test/test_ocp_php_s2i_integration.py new file mode 120000 index 000000000..b80ef5aef --- /dev/null +++ b/7.4/test/test_ocp_php_s2i_integration.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_integration.py \ No newline at end of file diff --git a/7.4/test/test_ocp_shared_helm_cakephp_application.py b/7.4/test/test_ocp_shared_helm_cakephp_application.py new file mode 120000 index 000000000..0e3fc630f --- /dev/null +++ b/7.4/test/test_ocp_shared_helm_cakephp_application.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_cakephp_application.py \ No newline at end of file diff --git a/7.4/test/test_ocp_shared_helm_chart_imagestreams.py b/7.4/test/test_ocp_shared_helm_chart_imagestreams.py new file mode 120000 index 000000000..45defea80 --- /dev/null +++ b/7.4/test/test_ocp_shared_helm_chart_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_chart_imagestreams.py \ No newline at end of file diff --git a/7.4/test/test_php_deploy_templates.py b/7.4/test/test_php_deploy_templates.py deleted file mode 120000 index 092efcb71..000000000 --- a/7.4/test/test_php_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_deploy_templates.py \ No newline at end of file diff --git a/7.4/test/test_php_latest_imagestreams.py b/7.4/test/test_php_latest_imagestreams.py deleted file mode 120000 index b4384d6a0..000000000 --- a/7.4/test/test_php_latest_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_latest_imagestreams.py \ No newline at end of file diff --git a/7.4/test/test_php_s2i_imagestreams.py b/7.4/test/test_php_s2i_imagestreams.py deleted file mode 120000 index acb01691f..000000000 --- a/7.4/test/test_php_s2i_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_imagestreams.py \ No newline at end of file diff --git a/7.4/test/test_php_s2i_integration.py b/7.4/test/test_php_s2i_integration.py deleted file mode 120000 index 68fa032e0..000000000 --- a/7.4/test/test_php_s2i_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_integration.py \ No newline at end of file diff --git a/7.4/test/test_shared_helm_cakephp_application.py b/7.4/test/test_shared_helm_cakephp_application.py deleted file mode 120000 index dd36f6162..000000000 --- a/7.4/test/test_shared_helm_cakephp_application.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_shared_helm_cakephp_application.py \ No newline at end of file diff --git a/7.4/test/test_shared_helm_chart_imagestreams.py b/7.4/test/test_shared_helm_chart_imagestreams.py deleted file mode 120000 index 58132e862..000000000 --- a/7.4/test/test_shared_helm_chart_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_shared_helm_chart_imagestreams.py \ No newline at end of file diff --git a/8.0/test/conftest.py b/8.0/test/conftest.py new file mode 120000 index 000000000..3f2d78400 --- /dev/null +++ b/8.0/test/conftest.py @@ -0,0 +1 @@ +../../test/conftest.py \ No newline at end of file diff --git a/8.0/test/constants.py b/8.0/test/constants.py deleted file mode 120000 index 360f725b2..000000000 --- a/8.0/test/constants.py +++ /dev/null @@ -1 +0,0 @@ -../../test/constants.py \ No newline at end of file diff --git a/8.0/test/run-pytest b/8.0/test/run-pytest new file mode 120000 index 000000000..efe32b484 --- /dev/null +++ b/8.0/test/run-pytest @@ -0,0 +1 @@ +../../test/run-pytest \ No newline at end of file diff --git a/8.0/test/test_container_application.py b/8.0/test/test_container_application.py new file mode 120000 index 000000000..25c1c1ece --- /dev/null +++ b/8.0/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/8.0/test/test_container_basics.py b/8.0/test/test_container_basics.py new file mode 120000 index 000000000..b85dc1397 --- /dev/null +++ b/8.0/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/8.0/test/test_container_ssl.py b/8.0/test/test_container_ssl.py new file mode 120000 index 000000000..4257c4642 --- /dev/null +++ b/8.0/test/test_container_ssl.py @@ -0,0 +1 @@ +../../test/test_container_ssl.py \ No newline at end of file diff --git a/8.0/test/test_ocp_php_deploy_templates.py b/8.0/test/test_ocp_php_deploy_templates.py new file mode 120000 index 000000000..986c85f30 --- /dev/null +++ b/8.0/test/test_ocp_php_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_php_deploy_templates.py \ No newline at end of file diff --git a/8.0/test/test_ocp_php_latest_imagestreams.py b/8.0/test/test_ocp_php_latest_imagestreams.py new file mode 120000 index 000000000..26e4c91c8 --- /dev/null +++ b/8.0/test/test_ocp_php_latest_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_latest_imagestreams.py \ No newline at end of file diff --git a/8.0/test/test_ocp_php_s2i_imagestreams.py b/8.0/test/test_ocp_php_s2i_imagestreams.py new file mode 120000 index 000000000..a4a14529a --- /dev/null +++ b/8.0/test/test_ocp_php_s2i_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_imagestreams.py \ No newline at end of file diff --git a/8.0/test/test_ocp_php_s2i_integration.py b/8.0/test/test_ocp_php_s2i_integration.py new file mode 120000 index 000000000..b80ef5aef --- /dev/null +++ b/8.0/test/test_ocp_php_s2i_integration.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_integration.py \ No newline at end of file diff --git a/8.0/test/test_ocp_shared_helm_cakephp_application.py b/8.0/test/test_ocp_shared_helm_cakephp_application.py new file mode 120000 index 000000000..0e3fc630f --- /dev/null +++ b/8.0/test/test_ocp_shared_helm_cakephp_application.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_cakephp_application.py \ No newline at end of file diff --git a/8.0/test/test_ocp_shared_helm_chart_imagestreams.py b/8.0/test/test_ocp_shared_helm_chart_imagestreams.py new file mode 120000 index 000000000..45defea80 --- /dev/null +++ b/8.0/test/test_ocp_shared_helm_chart_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_chart_imagestreams.py \ No newline at end of file diff --git a/8.0/test/test_php_deploy_templates.py b/8.0/test/test_php_deploy_templates.py deleted file mode 120000 index 092efcb71..000000000 --- a/8.0/test/test_php_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_deploy_templates.py \ No newline at end of file diff --git a/8.0/test/test_php_latest_imagestreams.py b/8.0/test/test_php_latest_imagestreams.py deleted file mode 120000 index b4384d6a0..000000000 --- a/8.0/test/test_php_latest_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_latest_imagestreams.py \ No newline at end of file diff --git a/8.0/test/test_php_s2i_imagestreams.py b/8.0/test/test_php_s2i_imagestreams.py deleted file mode 120000 index acb01691f..000000000 --- a/8.0/test/test_php_s2i_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_imagestreams.py \ No newline at end of file diff --git a/8.0/test/test_php_s2i_integration.py b/8.0/test/test_php_s2i_integration.py deleted file mode 120000 index 68fa032e0..000000000 --- a/8.0/test/test_php_s2i_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_integration.py \ No newline at end of file diff --git a/8.0/test/test_shared_helm_cakephp_application.py b/8.0/test/test_shared_helm_cakephp_application.py deleted file mode 120000 index dd36f6162..000000000 --- a/8.0/test/test_shared_helm_cakephp_application.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_shared_helm_cakephp_application.py \ No newline at end of file diff --git a/8.0/test/test_shared_helm_chart_imagestreams.py b/8.0/test/test_shared_helm_chart_imagestreams.py deleted file mode 120000 index 58132e862..000000000 --- a/8.0/test/test_shared_helm_chart_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_shared_helm_chart_imagestreams.py \ No newline at end of file diff --git a/8.1/test/conftest.py b/8.1/test/conftest.py new file mode 120000 index 000000000..3f2d78400 --- /dev/null +++ b/8.1/test/conftest.py @@ -0,0 +1 @@ +../../test/conftest.py \ No newline at end of file diff --git a/8.1/test/constants.py b/8.1/test/constants.py deleted file mode 120000 index 360f725b2..000000000 --- a/8.1/test/constants.py +++ /dev/null @@ -1 +0,0 @@ -../../test/constants.py \ No newline at end of file diff --git a/8.1/test/run-pytest b/8.1/test/run-pytest new file mode 120000 index 000000000..efe32b484 --- /dev/null +++ b/8.1/test/run-pytest @@ -0,0 +1 @@ +../../test/run-pytest \ No newline at end of file diff --git a/8.1/test/test_container_application.py b/8.1/test/test_container_application.py new file mode 120000 index 000000000..25c1c1ece --- /dev/null +++ b/8.1/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/8.1/test/test_container_basics.py b/8.1/test/test_container_basics.py new file mode 120000 index 000000000..b85dc1397 --- /dev/null +++ b/8.1/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/8.1/test/test_container_ssl.py b/8.1/test/test_container_ssl.py new file mode 120000 index 000000000..4257c4642 --- /dev/null +++ b/8.1/test/test_container_ssl.py @@ -0,0 +1 @@ +../../test/test_container_ssl.py \ No newline at end of file diff --git a/8.1/test/test_ocp_php_deploy_templates.py b/8.1/test/test_ocp_php_deploy_templates.py new file mode 120000 index 000000000..986c85f30 --- /dev/null +++ b/8.1/test/test_ocp_php_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_php_deploy_templates.py \ No newline at end of file diff --git a/8.1/test/test_ocp_php_latest_imagestreams.py b/8.1/test/test_ocp_php_latest_imagestreams.py new file mode 120000 index 000000000..26e4c91c8 --- /dev/null +++ b/8.1/test/test_ocp_php_latest_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_latest_imagestreams.py \ No newline at end of file diff --git a/8.1/test/test_ocp_php_s2i_imagestreams.py b/8.1/test/test_ocp_php_s2i_imagestreams.py new file mode 120000 index 000000000..a4a14529a --- /dev/null +++ b/8.1/test/test_ocp_php_s2i_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_imagestreams.py \ No newline at end of file diff --git a/8.1/test/test_ocp_php_s2i_integration.py b/8.1/test/test_ocp_php_s2i_integration.py new file mode 120000 index 000000000..b80ef5aef --- /dev/null +++ b/8.1/test/test_ocp_php_s2i_integration.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_integration.py \ No newline at end of file diff --git a/8.1/test/test_ocp_shared_helm_cakephp_application.py b/8.1/test/test_ocp_shared_helm_cakephp_application.py new file mode 120000 index 000000000..0e3fc630f --- /dev/null +++ b/8.1/test/test_ocp_shared_helm_cakephp_application.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_cakephp_application.py \ No newline at end of file diff --git a/8.1/test/test_ocp_shared_helm_chart_imagestreams.py b/8.1/test/test_ocp_shared_helm_chart_imagestreams.py new file mode 120000 index 000000000..45defea80 --- /dev/null +++ b/8.1/test/test_ocp_shared_helm_chart_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_chart_imagestreams.py \ No newline at end of file diff --git a/8.1/test/test_php_deploy_templates.py b/8.1/test/test_php_deploy_templates.py deleted file mode 120000 index 092efcb71..000000000 --- a/8.1/test/test_php_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_deploy_templates.py \ No newline at end of file diff --git a/8.1/test/test_php_latest_imagestreams.py b/8.1/test/test_php_latest_imagestreams.py deleted file mode 120000 index b4384d6a0..000000000 --- a/8.1/test/test_php_latest_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_latest_imagestreams.py \ No newline at end of file diff --git a/8.1/test/test_php_s2i_imagestreams.py b/8.1/test/test_php_s2i_imagestreams.py deleted file mode 120000 index acb01691f..000000000 --- a/8.1/test/test_php_s2i_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_imagestreams.py \ No newline at end of file diff --git a/8.1/test/test_php_s2i_integration.py b/8.1/test/test_php_s2i_integration.py deleted file mode 120000 index 68fa032e0..000000000 --- a/8.1/test/test_php_s2i_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_integration.py \ No newline at end of file diff --git a/8.1/test/test_shared_helm_cakephp_application.py b/8.1/test/test_shared_helm_cakephp_application.py deleted file mode 120000 index dd36f6162..000000000 --- a/8.1/test/test_shared_helm_cakephp_application.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_shared_helm_cakephp_application.py \ No newline at end of file diff --git a/8.1/test/test_shared_helm_chart_imagestreams.py b/8.1/test/test_shared_helm_chart_imagestreams.py deleted file mode 120000 index 58132e862..000000000 --- a/8.1/test/test_shared_helm_chart_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_shared_helm_chart_imagestreams.py \ No newline at end of file diff --git a/8.2/test/conftest.py b/8.2/test/conftest.py new file mode 120000 index 000000000..3f2d78400 --- /dev/null +++ b/8.2/test/conftest.py @@ -0,0 +1 @@ +../../test/conftest.py \ No newline at end of file diff --git a/8.2/test/constants.py b/8.2/test/constants.py deleted file mode 120000 index 360f725b2..000000000 --- a/8.2/test/constants.py +++ /dev/null @@ -1 +0,0 @@ -../../test/constants.py \ No newline at end of file diff --git a/8.2/test/run-pytest b/8.2/test/run-pytest new file mode 120000 index 000000000..efe32b484 --- /dev/null +++ b/8.2/test/run-pytest @@ -0,0 +1 @@ +../../test/run-pytest \ No newline at end of file diff --git a/8.2/test/test_container_application.py b/8.2/test/test_container_application.py new file mode 120000 index 000000000..25c1c1ece --- /dev/null +++ b/8.2/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/8.2/test/test_container_basics.py b/8.2/test/test_container_basics.py new file mode 120000 index 000000000..b85dc1397 --- /dev/null +++ b/8.2/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/8.2/test/test_container_ssl.py b/8.2/test/test_container_ssl.py new file mode 120000 index 000000000..4257c4642 --- /dev/null +++ b/8.2/test/test_container_ssl.py @@ -0,0 +1 @@ +../../test/test_container_ssl.py \ No newline at end of file diff --git a/8.2/test/test_ocp_php_deploy_templates.py b/8.2/test/test_ocp_php_deploy_templates.py new file mode 120000 index 000000000..986c85f30 --- /dev/null +++ b/8.2/test/test_ocp_php_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_php_deploy_templates.py \ No newline at end of file diff --git a/8.2/test/test_ocp_php_latest_imagestreams.py b/8.2/test/test_ocp_php_latest_imagestreams.py new file mode 120000 index 000000000..26e4c91c8 --- /dev/null +++ b/8.2/test/test_ocp_php_latest_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_latest_imagestreams.py \ No newline at end of file diff --git a/8.2/test/test_ocp_php_s2i_imagestreams.py b/8.2/test/test_ocp_php_s2i_imagestreams.py new file mode 120000 index 000000000..a4a14529a --- /dev/null +++ b/8.2/test/test_ocp_php_s2i_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_imagestreams.py \ No newline at end of file diff --git a/8.2/test/test_ocp_php_s2i_integration.py b/8.2/test/test_ocp_php_s2i_integration.py new file mode 120000 index 000000000..b80ef5aef --- /dev/null +++ b/8.2/test/test_ocp_php_s2i_integration.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_integration.py \ No newline at end of file diff --git a/8.2/test/test_ocp_shared_helm_cakephp_application.py b/8.2/test/test_ocp_shared_helm_cakephp_application.py new file mode 120000 index 000000000..0e3fc630f --- /dev/null +++ b/8.2/test/test_ocp_shared_helm_cakephp_application.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_cakephp_application.py \ No newline at end of file diff --git a/8.2/test/test_ocp_shared_helm_chart_imagestreams.py b/8.2/test/test_ocp_shared_helm_chart_imagestreams.py new file mode 120000 index 000000000..45defea80 --- /dev/null +++ b/8.2/test/test_ocp_shared_helm_chart_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_chart_imagestreams.py \ No newline at end of file diff --git a/8.2/test/test_php_deploy_templates.py b/8.2/test/test_php_deploy_templates.py deleted file mode 120000 index 092efcb71..000000000 --- a/8.2/test/test_php_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_deploy_templates.py \ No newline at end of file diff --git a/8.2/test/test_php_latest_imagestreams.py b/8.2/test/test_php_latest_imagestreams.py deleted file mode 120000 index b4384d6a0..000000000 --- a/8.2/test/test_php_latest_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_latest_imagestreams.py \ No newline at end of file diff --git a/8.2/test/test_php_s2i_imagestreams.py b/8.2/test/test_php_s2i_imagestreams.py deleted file mode 120000 index acb01691f..000000000 --- a/8.2/test/test_php_s2i_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_imagestreams.py \ No newline at end of file diff --git a/8.2/test/test_php_s2i_integration.py b/8.2/test/test_php_s2i_integration.py deleted file mode 120000 index 68fa032e0..000000000 --- a/8.2/test/test_php_s2i_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_integration.py \ No newline at end of file diff --git a/8.2/test/test_shared_helm_cakephp_application.py b/8.2/test/test_shared_helm_cakephp_application.py deleted file mode 120000 index dd36f6162..000000000 --- a/8.2/test/test_shared_helm_cakephp_application.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_shared_helm_cakephp_application.py \ No newline at end of file diff --git a/8.2/test/test_shared_helm_chart_imagestreams.py b/8.2/test/test_shared_helm_chart_imagestreams.py deleted file mode 120000 index 58132e862..000000000 --- a/8.2/test/test_shared_helm_chart_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_shared_helm_chart_imagestreams.py \ No newline at end of file diff --git a/8.3/test/conftest.py b/8.3/test/conftest.py new file mode 120000 index 000000000..3f2d78400 --- /dev/null +++ b/8.3/test/conftest.py @@ -0,0 +1 @@ +../../test/conftest.py \ No newline at end of file diff --git a/8.3/test/constants.py b/8.3/test/constants.py deleted file mode 120000 index 360f725b2..000000000 --- a/8.3/test/constants.py +++ /dev/null @@ -1 +0,0 @@ -../../test/constants.py \ No newline at end of file diff --git a/8.3/test/run-pytest b/8.3/test/run-pytest new file mode 120000 index 000000000..efe32b484 --- /dev/null +++ b/8.3/test/run-pytest @@ -0,0 +1 @@ +../../test/run-pytest \ No newline at end of file diff --git a/8.3/test/test_container_application.py b/8.3/test/test_container_application.py new file mode 120000 index 000000000..25c1c1ece --- /dev/null +++ b/8.3/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/8.3/test/test_container_basics.py b/8.3/test/test_container_basics.py new file mode 120000 index 000000000..b85dc1397 --- /dev/null +++ b/8.3/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/8.3/test/test_container_ssl.py b/8.3/test/test_container_ssl.py new file mode 120000 index 000000000..4257c4642 --- /dev/null +++ b/8.3/test/test_container_ssl.py @@ -0,0 +1 @@ +../../test/test_container_ssl.py \ No newline at end of file diff --git a/8.3/test/test_ocp_php_deploy_templates.py b/8.3/test/test_ocp_php_deploy_templates.py new file mode 120000 index 000000000..986c85f30 --- /dev/null +++ b/8.3/test/test_ocp_php_deploy_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_php_deploy_templates.py \ No newline at end of file diff --git a/8.3/test/test_ocp_php_latest_imagestreams.py b/8.3/test/test_ocp_php_latest_imagestreams.py new file mode 120000 index 000000000..26e4c91c8 --- /dev/null +++ b/8.3/test/test_ocp_php_latest_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_latest_imagestreams.py \ No newline at end of file diff --git a/8.3/test/test_ocp_php_s2i_imagestreams.py b/8.3/test/test_ocp_php_s2i_imagestreams.py new file mode 120000 index 000000000..a4a14529a --- /dev/null +++ b/8.3/test/test_ocp_php_s2i_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_imagestreams.py \ No newline at end of file diff --git a/8.3/test/test_ocp_php_s2i_integration.py b/8.3/test/test_ocp_php_s2i_integration.py new file mode 120000 index 000000000..b80ef5aef --- /dev/null +++ b/8.3/test/test_ocp_php_s2i_integration.py @@ -0,0 +1 @@ +../../test/test_ocp_php_s2i_integration.py \ No newline at end of file diff --git a/8.3/test/test_ocp_shared_helm_cakephp_application.py b/8.3/test/test_ocp_shared_helm_cakephp_application.py new file mode 120000 index 000000000..0e3fc630f --- /dev/null +++ b/8.3/test/test_ocp_shared_helm_cakephp_application.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_cakephp_application.py \ No newline at end of file diff --git a/8.3/test/test_ocp_shared_helm_chart_imagestreams.py b/8.3/test/test_ocp_shared_helm_chart_imagestreams.py new file mode 120000 index 000000000..45defea80 --- /dev/null +++ b/8.3/test/test_ocp_shared_helm_chart_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_shared_helm_chart_imagestreams.py \ No newline at end of file diff --git a/8.3/test/test_php_deploy_templates.py b/8.3/test/test_php_deploy_templates.py deleted file mode 120000 index 092efcb71..000000000 --- a/8.3/test/test_php_deploy_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_deploy_templates.py \ No newline at end of file diff --git a/8.3/test/test_php_latest_imagestreams.py b/8.3/test/test_php_latest_imagestreams.py deleted file mode 120000 index b4384d6a0..000000000 --- a/8.3/test/test_php_latest_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_latest_imagestreams.py \ No newline at end of file diff --git a/8.3/test/test_php_s2i_imagestreams.py b/8.3/test/test_php_s2i_imagestreams.py deleted file mode 120000 index acb01691f..000000000 --- a/8.3/test/test_php_s2i_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_imagestreams.py \ No newline at end of file diff --git a/8.3/test/test_php_s2i_integration.py b/8.3/test/test_php_s2i_integration.py deleted file mode 120000 index 68fa032e0..000000000 --- a/8.3/test/test_php_s2i_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_php_s2i_integration.py \ No newline at end of file diff --git a/8.3/test/test_shared_helm_cakephp_application.py b/8.3/test/test_shared_helm_cakephp_application.py deleted file mode 120000 index dd36f6162..000000000 --- a/8.3/test/test_shared_helm_cakephp_application.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_shared_helm_cakephp_application.py \ No newline at end of file diff --git a/8.3/test/test_shared_helm_chart_imagestreams.py b/8.3/test/test_shared_helm_chart_imagestreams.py deleted file mode 120000 index 58132e862..000000000 --- a/8.3/test/test_shared_helm_chart_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_shared_helm_chart_imagestreams.py \ No newline at end of file diff --git a/test/conftest.py b/test/conftest.py new file mode 100644 index 000000000..683c3c28e --- /dev/null +++ b/test/conftest.py @@ -0,0 +1,47 @@ +import os +import sys + +from pathlib import Path +from collections import namedtuple +from pytest import skip + +from container_ci_suite.utils import check_variables + +if not check_variables(): + sys.exit(1) + +TAGS = { + "rhel8": "-ubi8", + "rhel9": "-ubi9", + "rhel10": "-ubi10", +} + +Vars = namedtuple( + "Vars", [ + "OS", "TAG", "VERSION", "IMAGE_NAME", "IS_MINIMAL", + "SHORT_VERSION", "TEST_DIR", "BRANCH_TO_TEST", "CHECK_MSG" + ] +) +VERSION = os.getenv("VERSION") +OS = os.getenv("TARGET").lower() + +BRANCH_TO_TEST = "4.X" +if VERSION == "8.2" or VERSION == "8.3": + BRANCH_TO_TEST = "5.X" + +VARS = Vars( + OS=OS, + TAG=TAGS.get(OS), + VERSION=VERSION, + IMAGE_NAME=os.getenv("IMAGE_NAME"), + IS_MINIMAL="minimal" in VERSION, + SHORT_VERSION=VERSION.replace(".", ""), + TEST_DIR=Path(__file__).parent.absolute(), + BRANCH_TO_TEST=BRANCH_TO_TEST, + CHECK_MSG="Welcome to CakePHP", +) + + +def skip_clear_env_tests(): + if VARS.OS == "rhel8" and VERSION == "8.2": + skip(f"Skipping clear env tests for {VARS.VERSION} on {VARS.OS}.") diff --git a/test/constants.py b/test/constants.py deleted file mode 100644 index e0402ba6a..000000000 --- a/test/constants.py +++ /dev/null @@ -1,5 +0,0 @@ -TAGS = { - "rhel8": "-ubi8", - "rhel9": "-ubi9", - "rhel10": "-ubi10", -} diff --git a/test/run-openshift-pytest b/test/run-openshift-pytest index 80885f162..fad21c89d 100755 --- a/test/run-openshift-pytest +++ b/test/run-openshift-pytest @@ -8,4 +8,4 @@ THISDIR=$(dirname ${BASH_SOURCE[0]}) -cd "${THISDIR}" && python3.12 -m pytest -s -rA --showlocals -vv test_*.py +cd "${THISDIR}" && python3.12 -m pytest -s -rA --showlocals -vv test_ocp_*.py diff --git a/test/run-pytest b/test/run-pytest new file mode 100755 index 000000000..35fca6794 --- /dev/null +++ b/test/run-pytest @@ -0,0 +1,15 @@ +#!/bin/bash +# +# IMAGE_NAME specifies a name of the candidate image used for testing. +# The image has to be available before this script is executed. +# SINGLE_VERSION specifies the major version of httpd +# OS specifies RHEL version (e.g. OS=rhel8) +# + +THISDIR=$(dirname ${BASH_SOURCE[0]}) + +PYTHON_VERSION="3.12" +if [[ ! -f "/usr/bin/python$PYTHON_VERSION" ]]; then + PYTHON_VERSION="3.13" +fi +cd "${THISDIR}" && "python${PYTHON_VERSION}" -m pytest -s -rA --showlocals -vv test_container_*.py diff --git a/test/test_container_application.py b/test/test_container_application.py new file mode 100644 index 000000000..396f160fc --- /dev/null +++ b/test/test_container_application.py @@ -0,0 +1,194 @@ +import re + +import pytest + +from pathlib import Path + +from container_ci_suite.container_lib import ContainerTestLib +from container_ci_suite.engines.podman_wrapper import PodmanCLIWrapper +from container_ci_suite.engines.container import ContainerImage + +from conftest import VARS, skip_clear_env_tests + +test_app = VARS.TEST_DIR / "test-app" + + +def build_npm_app(app_path: Path) -> ContainerTestLib: + container_lib = ContainerTestLib(VARS.IMAGE_NAME) + s2i_app = container_lib.build_as_df( + app_path=app_path, + s2i_args=f"--pull-policy=never {container_lib.build_s2i_npm_variables()}", + src_image=VARS.IMAGE_NAME, + dst_image=f"{VARS.IMAGE_NAME}-testapp" + ) + return s2i_app + + +def build_s2i_app(app_path: Path, container_args: str = "") -> ContainerTestLib: + container_lib = ContainerTestLib(VARS.IMAGE_NAME) + app_name = app_path.name + s2i_app = container_lib.build_as_df( + app_path=app_path, + s2i_args=f"--pull-policy=never {container_args} {container_lib.build_s2i_npm_variables()}", + src_image=VARS.IMAGE_NAME, + dst_image=f"{VARS.IMAGE_NAME}-{app_name}" + ) + return s2i_app + + +class TestPHPTestApplicationContainer: + def setup_method(self): + self.s2i_app = build_s2i_app(test_app) + + def teardown_method(self): + self.s2i_app.cleanup() + + def test_run_s2i_usage(self): + output = self.s2i_app.s2i_usage() + assert output + + def test_docker_run_usage(self): + assert PodmanCLIWrapper.call_podman_command( + cmd=f"run --rm {VARS.IMAGE_NAME} &>/dev/null", + return_output=False + ) == 0 + + @pytest.mark.parametrize( + "container_arg", + [ + "", + "-u 12345", + ] + ) + def test_run_app_test(self, container_arg): + """ + Test checks if php-version is proper one + and specific pages returns expected message or return code. + """ + cid_file_name = self.s2i_app.app_name + assert self.s2i_app.create_container( + cid_file_name=cid_file_name, container_args=f"--user=100001 {container_arg}" + ) + assert ContainerImage.wait_for_cid(cid_file_name=cid_file_name) + cid = self.s2i_app.get_cid(cid_file_name=cid_file_name) + assert cid + assert VARS.VERSION in PodmanCLIWrapper.podman_exec_shell_command( + cid_file_name=cid, + cmd="php --version" + ) + assert VARS.VERSION in PodmanCLIWrapper.podman_exec_shell_command( + cid_file_name=cid, + cmd="php --version", + used_shell="/bin/sh" + ) + + cip = self.s2i_app.get_cip(cid_file_name=cid_file_name) + assert cip + # This function tests PHP session + assert self.s2i_app.test_response( + url=cip, page="/session_test.php", + expected_output="Passed" + ) + # Assert tests if connect to http://:8080 works + assert self.s2i_app.test_response( + url=cip + ) + # Assert tests if connect to https://:8443 works + assert self.s2i_app.test_response( + url=f"https://{cip}", port=8443 + ) + # test if configuration is writeable for php.ini + assert PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=VARS.IMAGE_NAME, + cmd="[ -w \\${PHP_SYSCONF_PATH}/php.ini ]", + return_output=False + ) == 0 + # test if php.d directory is writeable + assert PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=VARS.IMAGE_NAME, + cmd="[ -w \\${PHP_SYSCONF_PATH}/php.d ]", + return_output=False + ) == 0 + + +class TestPHPClearEnvContainer: + def setup_method(self): + container_args = "" if VARS.OS == "rhel8" else "-e PHP_CLEAR_ENV=OFF" + self.s2i_app = build_s2i_app(test_app, container_args=container_args) + + def teardown_method(self): + self.s2i_app.cleanup() + + def test_run_app_test(self): + """ + Test checks if php-version is proper one + and specific pages returns expected message or return code. + """ + skip_clear_env_tests() + cid_file_name = self.s2i_app.app_name + assert self.s2i_app.create_container(cid_file_name=cid_file_name, container_args="--user=100001") + assert ContainerImage.wait_for_cid(cid_file_name=cid_file_name) + cid = self.s2i_app.get_cid(cid_file_name=cid_file_name) + assert cid + assert VARS.VERSION in PodmanCLIWrapper.podman_exec_shell_command( + cid_file_name=cid, + cmd="php --version" + ) + assert VARS.VERSION in PodmanCLIWrapper.podman_exec_shell_command( + cid_file_name=cid, + cmd="php --version", + used_shell="/bin/sh" + ) + + cip = self.s2i_app.get_cip(cid_file_name=cid_file_name) + assert cip + # This function tests PHP session + assert self.s2i_app.test_response( + url=cip, page="/session_test.php", + expected_output="Passed" + ) + # Assert tests if connect to http://:8080 works + assert self.s2i_app.test_response( + url=cip + ) + # Assert tests if connect to https://:8443 works + assert self.s2i_app.test_response( + url=f"https://{cip}", port=8443 + ) + # test if configuration is writeable for php.ini + assert PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=VARS.IMAGE_NAME, + cmd="test -w \\${PHP_SYSCONF_PATH}/php.ini", + return_output=False + ) == 0 + # test if php.d directory is writeable + assert PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=VARS.IMAGE_NAME, + cmd="test -w \\${PHP_SYSCONF_PATH}/php.d", + return_output=False + ) == 0 + if VARS.OS in ("rhel9", "rhel10"): + # Checking if clear_env = no is set in /etc/php-fpm.d/www.conf file. + file_content = PodmanCLIWrapper.podman_get_file_content( + cid_file_name=cid, + filename="/etc/php-fpm.d/www.conf" + ) + for line in file_content.splitlines(): + if re.search("^clear_env = no", line): + break + else: + assert False, "'clear_env = no' not found in www.conf file." + + +class TestPHPNPMtestContainer: + def setup_method(self): + self.s2i_app = build_npm_app(test_app) + + def teardown_method(self): + self.s2i_app.cleanup() + + def test_npm_works(self): + """ + Test checks if NPM is valid and works properly + """ + assert self.s2i_app.npm_works(image_name=VARS.IMAGE_NAME) diff --git a/test/test_container_basics.py b/test/test_container_basics.py new file mode 100644 index 000000000..4717c4f35 --- /dev/null +++ b/test/test_container_basics.py @@ -0,0 +1,58 @@ +import pytest + +from container_ci_suite.container_lib import ContainerTestLib +from container_ci_suite.engines.podman_wrapper import PodmanCLIWrapper + +from conftest import VARS + + +class TestPHPContainer: + + def setup_method(self): + self.app = ContainerTestLib(image_name=VARS.IMAGE_NAME, s2i_image=True) + + def teardown_method(self): + self.app.cleanup() + + def test_run_s2i_usage(self): + """ + Test if /usr/libexec/s2i/usage works properly + """ + output = self.app.s2i_usage() + assert output + + def test_docker_run_usage(self): + """ + Test if podman run works properly + """ + assert PodmanCLIWrapper.call_podman_command( + cmd=f"run --rm {VARS.IMAGE_NAME} &>/dev/null", + return_output=False + ) == 0 + + def test_scl_usage(self): + assert VARS.VERSION in PodmanCLIWrapper.podman_run_command( + f"--rm {VARS.IMAGE_NAME} /bin/bash -c 'php --version'" + ) + + @pytest.mark.parametrize( + "dockerfile", + [ + "Dockerfile", + "Dockerfile.s2i" + ] + ) + def test_dockerfiles(self, dockerfile): + assert self.app.build_test_container( + dockerfile=VARS.TEST_DIR / "examples/from-dockerfile" / dockerfile, + app_url="https://github.com/sclorg/cakephp-ex.git", + app_dir="app-src" + ) + assert self.app.test_app_dockerfile() + cip = self.app.get_cip() + assert cip + assert self.app.test_response( + url=cip, + expected_output="Welcome to your CakePHP application on OpenShift", + debug=True + ) diff --git a/test/test_container_ssl.py b/test/test_container_ssl.py new file mode 100644 index 000000000..dcdd53f60 --- /dev/null +++ b/test/test_container_ssl.py @@ -0,0 +1,59 @@ +import tempfile + +from pathlib import Path + +from container_ci_suite.container_lib import ContainerTestLib +from container_ci_suite.engines.container import ContainerImage +from container_ci_suite.utils import ContainerTestLibUtils + +from conftest import VARS + +self_signed_ssl = VARS.TEST_DIR / "self-signed-ssl" + + +def build_ssl_app(app_path: Path, container_args: str = "") -> ContainerTestLib: + container_lib = ContainerTestLib(VARS.IMAGE_NAME) + app_name = app_path.name + s2i_app = container_lib.build_as_df( + app_path=app_path, + s2i_args=f"--pull-policy=never {container_args} {container_lib.build_s2i_npm_variables()}", + src_image=VARS.IMAGE_NAME, + dst_image=f"{VARS.IMAGE_NAME}-{app_name}" + ) + return s2i_app + + +class TestPHPSslTestAppContainer: + def setup_method(self): + self.s2i_app = build_ssl_app(self_signed_ssl) + + def teardown_method(self): + self.s2i_app.cleanup() + + def test_run_app_test(self): + """ + Test checks if SSL certificates are different then in server one. + The SSL certificates should not be used in production. + """ + cid_file_name = self.s2i_app.app_name + assert self.s2i_app.create_container(cid_file_name=cid_file_name, container_args="--user=100001") + assert ContainerImage.wait_for_cid(cid_file_name=cid_file_name) + cid = self.s2i_app.get_cid(cid_file_name=cid_file_name) + assert cid + cip = self.s2i_app.get_cip(cid_file_name=cid_file_name) + assert cip + assert self.s2i_app.test_response( + url=f"https://{cip}", port=8443 + ) + server_cmd = f"openssl s_client -showcerts -servername {cip} -connect {cip}:8443 2>/dev/null" + server_output = ContainerTestLibUtils.run_command(cmd=server_cmd) + certificate_dir = tempfile.mkdtemp(prefix="/tmp/server_cert_dir") + (Path(certificate_dir) / "output").write_text(server_output) + server_cert = ContainerTestLibUtils.run_command( + cmd=f"openssl x509 -inform pem -noout -text -in {Path(certificate_dir)}/output" + ) + config_cmd = (f"openssl x509 -in " + f"{VARS.TEST_DIR}/{self.s2i_app.app_name}/httpd-ssl/certs/server-cert-selfsigned.pem" + f" -inform pem -noout -text") + config_cert = ContainerTestLibUtils.run_command(cmd=config_cmd) + assert server_cert == config_cert diff --git a/test/test_ocp_php_deploy_templates.py b/test/test_ocp_php_deploy_templates.py new file mode 100644 index 000000000..6e1c25991 --- /dev/null +++ b/test/test_ocp_php_deploy_templates.py @@ -0,0 +1,39 @@ +from container_ci_suite.openshift import OpenShiftAPI + +from conftest import VARS, skip_clear_env_tests + + +class TestDeployTemplate: + + def setup_method(self): + self.oc_api = OpenShiftAPI(pod_name_prefix=f"php-{VARS.SHORT_VERSION}-testing", version=VARS.VERSION) + + def teardown_method(self): + self.oc_api.delete_project() + + def test_php_template_inside_cluster(self): + """ + Test checks if local imagestreams and example application `cakephp-ex` works with properly + and response is as expected + """ + skip_clear_env_tests() + self.oc_api.import_is("imagestreams/php-rhel.json", "", skip_check=True) + service_name = f"php-{VARS.SHORT_VERSION}-testing" + template_url = self.oc_api.get_raw_url_for_json( + container="cakephp-ex", dir="openshift/templates", filename="cakephp.json", branch=VARS.BRANCH_TO_TEST + ) + openshift_args = [ + f"SOURCE_REPOSITORY_REF={VARS.BRANCH_TO_TEST}", + f"PHP_VERSION={VARS.SHORT_VERSION}{VARS.TAG}", + f"NAME={service_name}" + ] + assert self.oc_api.deploy_template_with_image( + image_name=VARS.IMAGE_NAME, + template=template_url, + name_in_template="php", + openshift_args=openshift_args + ) + assert self.oc_api.is_template_deployed(name_in_template=service_name, timeout=480) + assert self.oc_api.check_response_inside_cluster( + name_in_template=service_name, expected_output=VARS.CHECK_MSG + ) diff --git a/test/test_ocp_php_latest_imagestreams.py b/test/test_ocp_php_latest_imagestreams.py new file mode 100644 index 000000000..aa8a0fe1a --- /dev/null +++ b/test/test_ocp_php_latest_imagestreams.py @@ -0,0 +1,17 @@ +from container_ci_suite.imagestreams import ImageStreamChecker + +from conftest import VARS + + +class TestLatestImagestreams: + + def setup_method(self): + self.isc = ImageStreamChecker(working_dir=VARS.TEST_DIR.parent.parent) + + def test_latest_imagestream(self): + """ + Test checks if local imagestreams are the latest one + """ + self.latest_version = self.isc.get_latest_version() + assert self.latest_version + self.isc.check_imagestreams(self.latest_version) diff --git a/test/test_php_s2i_imagestreams.py b/test/test_ocp_php_s2i_imagestreams.py similarity index 64% rename from test/test_php_s2i_imagestreams.py rename to test/test_ocp_php_s2i_imagestreams.py index ce865b4a9..1082be96a 100644 --- a/test/test_php_s2i_imagestreams.py +++ b/test/test_ocp_php_s2i_imagestreams.py @@ -1,36 +1,26 @@ -import os -import sys -import pytest - from container_ci_suite.openshift import OpenShiftAPI -from container_ci_suite.utils import 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") -OS = os.getenv("OS") -SHORT_VERSION = "".join(VERSION.split(".")) +from conftest import VARS class TestPHPImagestreams: def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix="php", version=VERSION) + self.oc_api = OpenShiftAPI(pod_name_prefix="php", version=VARS.VERSION) def teardown_method(self): self.oc_api.delete_project() def test_php_template_inside_cluster(self): - service_name = f"php-{SHORT_VERSION}-testing" + """ + Test checks if local repository with properly with `test/test-app` + response is as expected. + The imagestreams are used from this repository + """ + service_name = f"php-{VARS.SHORT_VERSION}-testing" assert self.oc_api.deploy_imagestream_s2i( imagestream_file="imagestreams/php-rhel.json", - image_name=IMAGE_NAME, + image_name=VARS.IMAGE_NAME, app="https://github.com/sclorg/s2i-php-container.git", context="test/test-app", service_name=service_name diff --git a/test/test_ocp_php_s2i_integration.py b/test/test_ocp_php_s2i_integration.py new file mode 100644 index 000000000..0916a4596 --- /dev/null +++ b/test/test_ocp_php_s2i_integration.py @@ -0,0 +1,28 @@ +from container_ci_suite.openshift import OpenShiftAPI + +from conftest import VARS + + +class TestS2IPHPTemplate: + + def setup_method(self): + self.oc_api = OpenShiftAPI(pod_name_prefix=f"php-{VARS.SHORT_VERSION}-testing", version=VARS.VERSION) + + def teardown_method(self): + self.oc_api.delete_project() + + def test_php_template_inside_cluster(self): + """ + Test checks if local repository with properly with `test/test-app` + response is as expected + """ + service_name = f"php-{VARS.SHORT_VERSION}-testing" + assert self.oc_api.deploy_s2i_app( + image_name=VARS.IMAGE_NAME, app="https://github.com/sclorg/s2i-php-container.git", + context="test/test-app", + service_name=service_name + ) + assert self.oc_api.is_template_deployed(name_in_template=service_name, timeout=480) + assert self.oc_api.check_response_inside_cluster( + name_in_template=service_name, expected_output="Test PHP passed" + ) diff --git a/test/test_ocp_shared_helm_cakephp_application.py b/test/test_ocp_shared_helm_cakephp_application.py new file mode 100644 index 000000000..78fbf5d73 --- /dev/null +++ b/test/test_ocp_shared_helm_cakephp_application.py @@ -0,0 +1,38 @@ +from container_ci_suite.helm import HelmChartsAPI + +from conftest import VARS + + +class TestHelmCakePHPTemplate: + + def setup_method(self): + package_name = "redhat-cakephp-application-template" + self.hc_api = HelmChartsAPI(path=VARS.TEST_DIR, package_name=package_name, tarball_dir=VARS.TEST_DIR) + self.hc_api.clone_helm_chart_repo( + repo_url="https://github.com/sclorg/helm-charts", repo_name="helm-charts", + subdir="charts/redhat" + ) + + def teardown_method(self): + self.hc_api.delete_project() + + def test_by_helm_test(self): + """ + Test checks if Helm imagestream and Helm perl dancer application + works properly and response is as expected. + """ + self.hc_api.package_name = "redhat-php-imagestreams" + assert self.hc_api.helm_package() + assert self.hc_api.helm_installation() + self.hc_api.package_name = "redhat-cakephp-application-template" + assert self.hc_api.helm_package() + assert self.hc_api.helm_installation( + values={ + "php_version": f"{VARS.VERSION}{VARS.TAG}", + "namespace": self.hc_api.namespace, + "source_repository_ref": VARS.BRANCH_TO_TEST, + "name": "cakephp-example" + } + ) + assert self.hc_api.is_s2i_pod_running(pod_name_prefix="cakephp-example", timeout=480) + assert self.hc_api.test_helm_chart(expected_str=[VARS.CHECK_MSG]) diff --git a/test/test_shared_helm_chart_imagestreams.py b/test/test_ocp_shared_helm_chart_imagestreams.py similarity index 76% rename from test/test_shared_helm_chart_imagestreams.py rename to test/test_ocp_shared_helm_chart_imagestreams.py index 33cbefec4..e2e539e4b 100644 --- a/test/test_shared_helm_chart_imagestreams.py +++ b/test/test_ocp_shared_helm_chart_imagestreams.py @@ -1,26 +1,17 @@ -import os -import sys - import pytest -from pathlib import Path from container_ci_suite.helm import HelmChartsAPI -from container_ci_suite.utils import check_variables - -if not check_variables(): - print("At least one variable from IMAGE_NAME, OS, VERSION is missing.") - sys.exit(1) - -test_dir = Path(os.path.abspath(os.path.dirname(__file__))) +from conftest import VARS class TestHelmRHELPHPImageStreams: def setup_method(self): package_name = "redhat-php-imagestreams" - path = test_dir - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir, shared_cluster=True) + self.hc_api = HelmChartsAPI( + path=VARS.TEST_DIR, package_name=package_name, tarball_dir=VARS.TEST_DIR, shared_cluster=True + ) self.hc_api.clone_helm_chart_repo( repo_url="https://github.com/sclorg/helm-charts", repo_name="helm-charts", subdir="charts/redhat" @@ -43,6 +34,9 @@ def teardown_method(self): ], ) def test_package_imagestream(self, version, registry, expected): + """ + Test checks if Helm imagestreams are present + """ assert self.hc_api.helm_package() assert self.hc_api.helm_installation() assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected diff --git a/test/test_php_deploy_templates.py b/test/test_php_deploy_templates.py deleted file mode 100644 index 446a0fc57..000000000 --- a/test/test_php_deploy_templates.py +++ /dev/null @@ -1,79 +0,0 @@ -import os -import sys - -import pytest -from container_ci_suite.openshift import OpenShiftAPI -from container_ci_suite.utils import check_variables - -from constants import TAGS - -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") -OS = os.getenv("TARGET") - -if VERSION == "7.4" or VERSION == "8.0": - branch_to_test = "4.X" - check_msg = "Welcome to CakePHP" -elif VERSION == "8.2" or VERSION == "8.3": - branch_to_test = "5.X" - check_msg = "Welcome to CakePHP" -else: - branch_to_test = "master" - check_msg = "Welcome to your CakePHP application on OpenShift" - -TAG = TAGS.get(OS) - -new_version = VERSION.replace(".", "") - -# DEPLOYED_MYSQL_IMAGE = "quay.io/sclorg/mysql-80-c9s" -# IMAGE_SHORT = f"mysql:8.0-el9" -# IMAGE_TAG = f"8.0-el9" - - -class TestDeployTemplate: - - def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix=f"php-{new_version}-testing", version=VERSION) - #assert self.oc_api.upload_image(DEPLOYED_MYSQL_IMAGE, IMAGE_SHORT) - - def teardown_method(self): - self.oc_api.delete_project() - - @pytest.mark.parametrize( - "template", - [ - "cakephp.json", - ] - ) - def test_php_template_inside_cluster(self, template): - self.oc_api.import_is("imagestreams/php-rhel.json", "", skip_check=True) - service_name = f"php-{new_version}-testing" - template_url = self.oc_api.get_raw_url_for_json( - container="cakephp-ex", dir="openshift/templates", filename=template, branch=branch_to_test - ) - openshift_args = [ - f"SOURCE_REPOSITORY_REF={branch_to_test}", - f"PHP_VERSION={VERSION}{TAG}", - f"NAME={service_name}" - ] - # if template != "cakephp.json": - # openshift_args.extend([ - # f"MYSQL_VERSION={IMAGE_TAG}", - # f"DATABASE_USER=testu", - # f"DATABASE_PASSWORD=testp" - # ]) - assert self.oc_api.deploy_template_with_image( - image_name=IMAGE_NAME, - template=template_url, - name_in_template="php", - openshift_args=openshift_args - ) - assert self.oc_api.is_template_deployed(name_in_template=service_name) - assert self.oc_api.check_response_inside_cluster( - name_in_template=service_name, expected_output=check_msg - ) diff --git a/test/test_php_latest_imagestreams.py b/test/test_php_latest_imagestreams.py deleted file mode 100644 index 70aa92acd..000000000 --- a/test/test_php_latest_imagestreams.py +++ /dev/null @@ -1,27 +0,0 @@ -import os -import sys - -from pathlib import Path - -from container_ci_suite.imagestreams import ImageStreamChecker -from container_ci_suite.utils import check_variables - -TEST_DIR = Path(os.path.abspath(os.path.dirname(__file__))) - -if not check_variables(): - print("At least one variable from IMAGE_NAME, OS, VERSION is missing.") - sys.exit(1) - -VERSION = os.getenv("VERSION") - - -# Replacement with 'test_latest_imagestreams' -class TestLatestImagestreams: - - def setup_method(self): - self.isc = ImageStreamChecker(working_dir=TEST_DIR.parent.parent) - - def test_latest_imagestream(self): - self.latest_version = self.isc.get_latest_version() - assert self.latest_version != "" - self.isc.check_imagestreams(self.latest_version) diff --git a/test/test_php_s2i_integration.py b/test/test_php_s2i_integration.py deleted file mode 100644 index a724b3b8a..000000000 --- a/test/test_php_s2i_integration.py +++ /dev/null @@ -1,36 +0,0 @@ -import os -import sys - -from container_ci_suite.utils import check_variables -from container_ci_suite.openshift import OpenShiftAPI - -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") -OS = os.getenv("TARGET") -new_version = VERSION.replace(".", "") - -# Replacement with 'test_python_s2i_app_ex' -class TestS2IPHPTemplate: - - def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix=f"php-{new_version}-testing", version=VERSION) - - def teardown_method(self): - self.oc_api.delete_project() - - def test_php_template_inside_cluster(self): - service_name = f"php-{new_version}-testing" - assert self.oc_api.deploy_s2i_app( - image_name=IMAGE_NAME, app=f"https://github.com/sclorg/s2i-php-container.git", - context="test/test-app", - service_name=service_name - ) - assert self.oc_api.is_template_deployed(name_in_template=service_name, timeout=480) - assert self.oc_api.check_response_inside_cluster( - name_in_template=service_name, expected_output="Test PHP passed" - ) diff --git a/test/test_shared_helm_cakephp_application.py b/test/test_shared_helm_cakephp_application.py deleted file mode 100644 index 15b231b7e..000000000 --- a/test/test_shared_helm_cakephp_application.py +++ /dev/null @@ -1,68 +0,0 @@ -import os -import sys - -import pytest -from pathlib import Path - -from container_ci_suite.helm import HelmChartsAPI -from container_ci_suite.utils import check_variables - -from constants import TAGS - -if not check_variables(): - print("At least one variable from IMAGE_NAME, OS, VERSION is missing.") - sys.exit(1) - - -test_dir = Path(os.path.abspath(os.path.dirname(__file__))) - - -VERSION = os.getenv("VERSION") -IMAGE_NAME = os.getenv("IMAGE_NAME") -OS = os.getenv("TARGET") - -if VERSION == "7.4" or VERSION == "8.0": - check_msg = "Welcome to CakePHP" -elif VERSION == "8.2" or VERSION == "8.3": - check_msg = "Welcome to CakePHP" -else: - check_msg = "Welcome to your CakePHP application on OpenShift" - -TAG = TAGS.get(OS) - - -class TestHelmCakePHPTemplate: - - def setup_method(self): - package_name = "redhat-cakephp-application-template" - path = test_dir - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) - self.hc_api.clone_helm_chart_repo( - repo_url="https://github.com/sclorg/helm-charts", repo_name="helm-charts", - subdir="charts/redhat" - ) - - def teardown_method(self): - self.hc_api.delete_project() - - def test_by_helm_test(self): - branch_to_test = "4.X" - check_msg = "Welcome to CakePHP" - if VERSION.startswith("8.2") or VERSION.startswith("8.3"): - branch_to_test = "5.X" - check_msg = "Welcome to CakePHP" - self.hc_api.package_name = "redhat-php-imagestreams" - assert self.hc_api.helm_package() - assert self.hc_api.helm_installation() - self.hc_api.package_name = "redhat-cakephp-application-template" - assert self.hc_api.helm_package() - assert self.hc_api.helm_installation( - values={ - "php_version": f"{VERSION}{TAG}", - "namespace": self.hc_api.namespace, - "source_repository_ref": branch_to_test, - "name": "cakephp-example" - } - ) - assert self.hc_api.is_s2i_pod_running(pod_name_prefix="cakephp-example", timeout=480) - assert self.hc_api.test_helm_chart(expected_str=[check_msg])