diff --git a/2.5/test/conftest.py b/2.5/test/conftest.py new file mode 120000 index 00000000..3f2d7840 --- /dev/null +++ b/2.5/test/conftest.py @@ -0,0 +1 @@ +../../test/conftest.py \ No newline at end of file diff --git a/2.5/test/constants.py b/2.5/test/constants.py deleted file mode 120000 index 360f725b..00000000 --- a/2.5/test/constants.py +++ /dev/null @@ -1 +0,0 @@ -../../test/constants.py \ No newline at end of file diff --git a/2.5/test/run-pytest b/2.5/test/run-pytest new file mode 120000 index 00000000..efe32b48 --- /dev/null +++ b/2.5/test/run-pytest @@ -0,0 +1 @@ +../../test/run-pytest \ No newline at end of file diff --git a/2.5/test/test_container_application.py b/2.5/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/2.5/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/2.5/test/test_container_basics.py b/2.5/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/2.5/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/2.5/test/test_container_fips.py b/2.5/test/test_container_fips.py new file mode 120000 index 00000000..b06669f3 --- /dev/null +++ b/2.5/test/test_container_fips.py @@ -0,0 +1 @@ +../../test/test_container_fips.py \ No newline at end of file diff --git a/2.5/test/test_helm_ruby_imagestreams.py b/2.5/test/test_helm_ruby_imagestreams.py deleted file mode 120000 index c759afba..00000000 --- a/2.5/test/test_helm_ruby_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_ruby_imagestreams.py \ No newline at end of file diff --git a/2.5/test/test_helm_ruby_rails_application.py b/2.5/test/test_helm_ruby_rails_application.py deleted file mode 120000 index 28f86c0a..00000000 --- a/2.5/test/test_helm_ruby_rails_application.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_ruby_rails_application.py \ No newline at end of file diff --git a/2.5/test/test_ocp_helm_ruby_imagestreams.py b/2.5/test/test_ocp_helm_ruby_imagestreams.py new file mode 120000 index 00000000..998c113c --- /dev/null +++ b/2.5/test/test_ocp_helm_ruby_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_ruby_imagestreams.py \ No newline at end of file diff --git a/2.5/test/test_ocp_helm_ruby_rails_application.py b/2.5/test/test_ocp_helm_ruby_rails_application.py new file mode 120000 index 00000000..aa7e5df2 --- /dev/null +++ b/2.5/test/test_ocp_helm_ruby_rails_application.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_ruby_rails_application.py \ No newline at end of file diff --git a/2.5/test/test_ocp_ruby_ex_standalone.py b/2.5/test/test_ocp_ruby_ex_standalone.py new file mode 120000 index 00000000..42ee4afc --- /dev/null +++ b/2.5/test/test_ocp_ruby_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_ruby_ex_standalone.py \ No newline at end of file diff --git a/2.5/test/test_ocp_ruby_latest_imagestreams.py b/2.5/test/test_ocp_ruby_latest_imagestreams.py new file mode 120000 index 00000000..247808c0 --- /dev/null +++ b/2.5/test/test_ocp_ruby_latest_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_ruby_latest_imagestreams.py \ No newline at end of file diff --git a/2.5/test/test_ocp_s2i_imagestreams.py b/2.5/test/test_ocp_s2i_imagestreams.py new file mode 120000 index 00000000..3c4b5d99 --- /dev/null +++ b/2.5/test/test_ocp_s2i_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_imagestreams.py \ No newline at end of file diff --git a/2.5/test/test_ocp_s2i_integration.py b/2.5/test/test_ocp_s2i_integration.py new file mode 120000 index 00000000..01bb85c5 --- /dev/null +++ b/2.5/test/test_ocp_s2i_integration.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_integration.py \ No newline at end of file diff --git a/2.5/test/test_ocp_s2i_local_templates.py b/2.5/test/test_ocp_s2i_local_templates.py new file mode 120000 index 00000000..16ba9d8b --- /dev/null +++ b/2.5/test/test_ocp_s2i_local_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_local_templates.py \ No newline at end of file diff --git a/2.5/test/test_ocp_s2i_rails_ex_templates.py b/2.5/test/test_ocp_s2i_rails_ex_templates.py new file mode 120000 index 00000000..b5ce0d4d --- /dev/null +++ b/2.5/test/test_ocp_s2i_rails_ex_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_rails_ex_templates.py \ No newline at end of file diff --git a/2.5/test/test_ruby_ex_standalone.py b/2.5/test/test_ruby_ex_standalone.py deleted file mode 120000 index cfca1c8a..00000000 --- a/2.5/test/test_ruby_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ruby_ex_standalone.py \ No newline at end of file diff --git a/2.5/test/test_ruby_latest_imagestreams.py b/2.5/test/test_ruby_latest_imagestreams.py deleted file mode 120000 index f32f843f..00000000 --- a/2.5/test/test_ruby_latest_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ruby_latest_imagestreams.py \ No newline at end of file diff --git a/2.5/test/test_s2i_imagestreams.py b/2.5/test/test_s2i_imagestreams.py deleted file mode 120000 index 00c872cb..00000000 --- a/2.5/test/test_s2i_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_imagestreams.py \ No newline at end of file diff --git a/2.5/test/test_s2i_integration.py b/2.5/test/test_s2i_integration.py deleted file mode 120000 index c7827e84..00000000 --- a/2.5/test/test_s2i_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_integration.py \ No newline at end of file diff --git a/2.5/test/test_s2i_local_templates.py b/2.5/test/test_s2i_local_templates.py deleted file mode 120000 index c844e41f..00000000 --- a/2.5/test/test_s2i_local_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_local_templates.py \ No newline at end of file diff --git a/2.5/test/test_s2i_rails_ex_templates.py b/2.5/test/test_s2i_rails_ex_templates.py deleted file mode 120000 index 9df6ffd1..00000000 --- a/2.5/test/test_s2i_rails_ex_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_rails_ex_templates.py \ No newline at end of file diff --git a/3.0/test/conftest.py b/3.0/test/conftest.py new file mode 120000 index 00000000..3f2d7840 --- /dev/null +++ b/3.0/test/conftest.py @@ -0,0 +1 @@ +../../test/conftest.py \ No newline at end of file diff --git a/3.0/test/constants.py b/3.0/test/constants.py deleted file mode 120000 index 360f725b..00000000 --- a/3.0/test/constants.py +++ /dev/null @@ -1 +0,0 @@ -../../test/constants.py \ No newline at end of file diff --git a/3.0/test/run-pytest b/3.0/test/run-pytest new file mode 120000 index 00000000..efe32b48 --- /dev/null +++ b/3.0/test/run-pytest @@ -0,0 +1 @@ +../../test/run-pytest \ No newline at end of file diff --git a/3.0/test/test_container_application.py b/3.0/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.0/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.0/test/test_container_basics.py b/3.0/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.0/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.0/test/test_container_fips.py b/3.0/test/test_container_fips.py new file mode 120000 index 00000000..b06669f3 --- /dev/null +++ b/3.0/test/test_container_fips.py @@ -0,0 +1 @@ +../../test/test_container_fips.py \ No newline at end of file diff --git a/3.0/test/test_helm_ruby_imagestreams.py b/3.0/test/test_helm_ruby_imagestreams.py deleted file mode 120000 index c759afba..00000000 --- a/3.0/test/test_helm_ruby_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_ruby_imagestreams.py \ No newline at end of file diff --git a/3.0/test/test_helm_ruby_rails_application.py b/3.0/test/test_helm_ruby_rails_application.py deleted file mode 120000 index 28f86c0a..00000000 --- a/3.0/test/test_helm_ruby_rails_application.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_ruby_rails_application.py \ No newline at end of file diff --git a/3.0/test/test_ocp_helm_ruby_imagestreams.py b/3.0/test/test_ocp_helm_ruby_imagestreams.py new file mode 120000 index 00000000..998c113c --- /dev/null +++ b/3.0/test/test_ocp_helm_ruby_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_ruby_imagestreams.py \ No newline at end of file diff --git a/3.0/test/test_ocp_helm_ruby_rails_application.py b/3.0/test/test_ocp_helm_ruby_rails_application.py new file mode 120000 index 00000000..aa7e5df2 --- /dev/null +++ b/3.0/test/test_ocp_helm_ruby_rails_application.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_ruby_rails_application.py \ No newline at end of file diff --git a/3.0/test/test_ocp_ruby_ex_standalone.py b/3.0/test/test_ocp_ruby_ex_standalone.py new file mode 120000 index 00000000..42ee4afc --- /dev/null +++ b/3.0/test/test_ocp_ruby_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_ruby_ex_standalone.py \ No newline at end of file diff --git a/3.0/test/test_ocp_ruby_latest_imagestreams.py b/3.0/test/test_ocp_ruby_latest_imagestreams.py new file mode 120000 index 00000000..247808c0 --- /dev/null +++ b/3.0/test/test_ocp_ruby_latest_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_ruby_latest_imagestreams.py \ No newline at end of file diff --git a/3.0/test/test_ocp_s2i_imagestreams.py b/3.0/test/test_ocp_s2i_imagestreams.py new file mode 120000 index 00000000..3c4b5d99 --- /dev/null +++ b/3.0/test/test_ocp_s2i_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_imagestreams.py \ No newline at end of file diff --git a/3.0/test/test_ocp_s2i_integration.py b/3.0/test/test_ocp_s2i_integration.py new file mode 120000 index 00000000..01bb85c5 --- /dev/null +++ b/3.0/test/test_ocp_s2i_integration.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_integration.py \ No newline at end of file diff --git a/3.0/test/test_ocp_s2i_local_templates.py b/3.0/test/test_ocp_s2i_local_templates.py new file mode 120000 index 00000000..16ba9d8b --- /dev/null +++ b/3.0/test/test_ocp_s2i_local_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_local_templates.py \ No newline at end of file diff --git a/3.0/test/test_ocp_s2i_rails_ex_templates.py b/3.0/test/test_ocp_s2i_rails_ex_templates.py new file mode 120000 index 00000000..b5ce0d4d --- /dev/null +++ b/3.0/test/test_ocp_s2i_rails_ex_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_rails_ex_templates.py \ No newline at end of file diff --git a/3.0/test/test_ruby_ex_standalone.py b/3.0/test/test_ruby_ex_standalone.py deleted file mode 120000 index cfca1c8a..00000000 --- a/3.0/test/test_ruby_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ruby_ex_standalone.py \ No newline at end of file diff --git a/3.0/test/test_ruby_latest_imagestreams.py b/3.0/test/test_ruby_latest_imagestreams.py deleted file mode 120000 index f32f843f..00000000 --- a/3.0/test/test_ruby_latest_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ruby_latest_imagestreams.py \ No newline at end of file diff --git a/3.0/test/test_s2i_imagestreams.py b/3.0/test/test_s2i_imagestreams.py deleted file mode 120000 index 00c872cb..00000000 --- a/3.0/test/test_s2i_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_imagestreams.py \ No newline at end of file diff --git a/3.0/test/test_s2i_integration.py b/3.0/test/test_s2i_integration.py deleted file mode 120000 index c7827e84..00000000 --- a/3.0/test/test_s2i_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_integration.py \ No newline at end of file diff --git a/3.0/test/test_s2i_local_templates.py b/3.0/test/test_s2i_local_templates.py deleted file mode 120000 index c844e41f..00000000 --- a/3.0/test/test_s2i_local_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_local_templates.py \ No newline at end of file diff --git a/3.0/test/test_s2i_rails_ex_templates.py b/3.0/test/test_s2i_rails_ex_templates.py deleted file mode 120000 index 9df6ffd1..00000000 --- a/3.0/test/test_s2i_rails_ex_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_rails_ex_templates.py \ No newline at end of file diff --git a/3.1/test/conftest.py b/3.1/test/conftest.py new file mode 120000 index 00000000..3f2d7840 --- /dev/null +++ b/3.1/test/conftest.py @@ -0,0 +1 @@ +../../test/conftest.py \ No newline at end of file diff --git a/3.1/test/constants.py b/3.1/test/constants.py deleted file mode 120000 index 360f725b..00000000 --- a/3.1/test/constants.py +++ /dev/null @@ -1 +0,0 @@ -../../test/constants.py \ No newline at end of file diff --git a/3.1/test/run-pytest b/3.1/test/run-pytest new file mode 120000 index 00000000..efe32b48 --- /dev/null +++ b/3.1/test/run-pytest @@ -0,0 +1 @@ +../../test/run-pytest \ No newline at end of file diff --git a/3.1/test/test_container_application.py b/3.1/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.1/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.1/test/test_container_basics.py b/3.1/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.1/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.1/test/test_container_fips.py b/3.1/test/test_container_fips.py new file mode 120000 index 00000000..b06669f3 --- /dev/null +++ b/3.1/test/test_container_fips.py @@ -0,0 +1 @@ +../../test/test_container_fips.py \ No newline at end of file diff --git a/3.1/test/test_helm_ruby_imagestreams.py b/3.1/test/test_helm_ruby_imagestreams.py deleted file mode 120000 index c759afba..00000000 --- a/3.1/test/test_helm_ruby_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_ruby_imagestreams.py \ No newline at end of file diff --git a/3.1/test/test_helm_ruby_rails_application.py b/3.1/test/test_helm_ruby_rails_application.py deleted file mode 120000 index 28f86c0a..00000000 --- a/3.1/test/test_helm_ruby_rails_application.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_ruby_rails_application.py \ No newline at end of file diff --git a/3.1/test/test_ocp_helm_ruby_imagestreams.py b/3.1/test/test_ocp_helm_ruby_imagestreams.py new file mode 120000 index 00000000..998c113c --- /dev/null +++ b/3.1/test/test_ocp_helm_ruby_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_ruby_imagestreams.py \ No newline at end of file diff --git a/3.1/test/test_ocp_helm_ruby_rails_application.py b/3.1/test/test_ocp_helm_ruby_rails_application.py new file mode 120000 index 00000000..aa7e5df2 --- /dev/null +++ b/3.1/test/test_ocp_helm_ruby_rails_application.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_ruby_rails_application.py \ No newline at end of file diff --git a/3.1/test/test_ocp_ruby_ex_standalone.py b/3.1/test/test_ocp_ruby_ex_standalone.py new file mode 120000 index 00000000..42ee4afc --- /dev/null +++ b/3.1/test/test_ocp_ruby_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_ruby_ex_standalone.py \ No newline at end of file diff --git a/3.1/test/test_ocp_ruby_latest_imagestreams.py b/3.1/test/test_ocp_ruby_latest_imagestreams.py new file mode 120000 index 00000000..247808c0 --- /dev/null +++ b/3.1/test/test_ocp_ruby_latest_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_ruby_latest_imagestreams.py \ No newline at end of file diff --git a/3.1/test/test_ocp_s2i_imagestreams.py b/3.1/test/test_ocp_s2i_imagestreams.py new file mode 120000 index 00000000..3c4b5d99 --- /dev/null +++ b/3.1/test/test_ocp_s2i_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_imagestreams.py \ No newline at end of file diff --git a/3.1/test/test_ocp_s2i_integration.py b/3.1/test/test_ocp_s2i_integration.py new file mode 120000 index 00000000..01bb85c5 --- /dev/null +++ b/3.1/test/test_ocp_s2i_integration.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_integration.py \ No newline at end of file diff --git a/3.1/test/test_ocp_s2i_local_templates.py b/3.1/test/test_ocp_s2i_local_templates.py new file mode 120000 index 00000000..16ba9d8b --- /dev/null +++ b/3.1/test/test_ocp_s2i_local_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_local_templates.py \ No newline at end of file diff --git a/3.1/test/test_ocp_s2i_rails_ex_templates.py b/3.1/test/test_ocp_s2i_rails_ex_templates.py new file mode 120000 index 00000000..b5ce0d4d --- /dev/null +++ b/3.1/test/test_ocp_s2i_rails_ex_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_rails_ex_templates.py \ No newline at end of file diff --git a/3.1/test/test_ruby_ex_standalone.py b/3.1/test/test_ruby_ex_standalone.py deleted file mode 120000 index cfca1c8a..00000000 --- a/3.1/test/test_ruby_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ruby_ex_standalone.py \ No newline at end of file diff --git a/3.1/test/test_ruby_latest_imagestreams.py b/3.1/test/test_ruby_latest_imagestreams.py deleted file mode 120000 index f32f843f..00000000 --- a/3.1/test/test_ruby_latest_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ruby_latest_imagestreams.py \ No newline at end of file diff --git a/3.1/test/test_s2i_imagestreams.py b/3.1/test/test_s2i_imagestreams.py deleted file mode 120000 index 00c872cb..00000000 --- a/3.1/test/test_s2i_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_imagestreams.py \ No newline at end of file diff --git a/3.1/test/test_s2i_integration.py b/3.1/test/test_s2i_integration.py deleted file mode 120000 index c7827e84..00000000 --- a/3.1/test/test_s2i_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_integration.py \ No newline at end of file diff --git a/3.1/test/test_s2i_local_templates.py b/3.1/test/test_s2i_local_templates.py deleted file mode 120000 index c844e41f..00000000 --- a/3.1/test/test_s2i_local_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_local_templates.py \ No newline at end of file diff --git a/3.1/test/test_s2i_rails_ex_templates.py b/3.1/test/test_s2i_rails_ex_templates.py deleted file mode 120000 index 9df6ffd1..00000000 --- a/3.1/test/test_s2i_rails_ex_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_rails_ex_templates.py \ No newline at end of file diff --git a/3.3/test/conftest.py b/3.3/test/conftest.py new file mode 120000 index 00000000..3f2d7840 --- /dev/null +++ b/3.3/test/conftest.py @@ -0,0 +1 @@ +../../test/conftest.py \ No newline at end of file diff --git a/3.3/test/constants.py b/3.3/test/constants.py deleted file mode 120000 index 360f725b..00000000 --- a/3.3/test/constants.py +++ /dev/null @@ -1 +0,0 @@ -../../test/constants.py \ No newline at end of file diff --git a/3.3/test/run-pytest b/3.3/test/run-pytest new file mode 120000 index 00000000..efe32b48 --- /dev/null +++ b/3.3/test/run-pytest @@ -0,0 +1 @@ +../../test/run-pytest \ No newline at end of file diff --git a/3.3/test/test_container_application.py b/3.3/test/test_container_application.py new file mode 120000 index 00000000..25c1c1ec --- /dev/null +++ b/3.3/test/test_container_application.py @@ -0,0 +1 @@ +../../test/test_container_application.py \ No newline at end of file diff --git a/3.3/test/test_container_basics.py b/3.3/test/test_container_basics.py new file mode 120000 index 00000000..b85dc139 --- /dev/null +++ b/3.3/test/test_container_basics.py @@ -0,0 +1 @@ +../../test/test_container_basics.py \ No newline at end of file diff --git a/3.3/test/test_container_fips.py b/3.3/test/test_container_fips.py new file mode 120000 index 00000000..b06669f3 --- /dev/null +++ b/3.3/test/test_container_fips.py @@ -0,0 +1 @@ +../../test/test_container_fips.py \ No newline at end of file diff --git a/3.3/test/test_helm_ruby_imagestreams.py b/3.3/test/test_helm_ruby_imagestreams.py deleted file mode 120000 index c759afba..00000000 --- a/3.3/test/test_helm_ruby_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_ruby_imagestreams.py \ No newline at end of file diff --git a/3.3/test/test_helm_ruby_rails_application.py b/3.3/test/test_helm_ruby_rails_application.py deleted file mode 120000 index 28f86c0a..00000000 --- a/3.3/test/test_helm_ruby_rails_application.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_helm_ruby_rails_application.py \ No newline at end of file diff --git a/3.3/test/test_ocp_helm_ruby_imagestreams.py b/3.3/test/test_ocp_helm_ruby_imagestreams.py new file mode 120000 index 00000000..998c113c --- /dev/null +++ b/3.3/test/test_ocp_helm_ruby_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_ruby_imagestreams.py \ No newline at end of file diff --git a/3.3/test/test_ocp_helm_ruby_rails_application.py b/3.3/test/test_ocp_helm_ruby_rails_application.py new file mode 120000 index 00000000..aa7e5df2 --- /dev/null +++ b/3.3/test/test_ocp_helm_ruby_rails_application.py @@ -0,0 +1 @@ +../../test/test_ocp_helm_ruby_rails_application.py \ No newline at end of file diff --git a/3.3/test/test_ocp_ruby_ex_standalone.py b/3.3/test/test_ocp_ruby_ex_standalone.py new file mode 120000 index 00000000..42ee4afc --- /dev/null +++ b/3.3/test/test_ocp_ruby_ex_standalone.py @@ -0,0 +1 @@ +../../test/test_ocp_ruby_ex_standalone.py \ No newline at end of file diff --git a/3.3/test/test_ocp_ruby_latest_imagestreams.py b/3.3/test/test_ocp_ruby_latest_imagestreams.py new file mode 120000 index 00000000..247808c0 --- /dev/null +++ b/3.3/test/test_ocp_ruby_latest_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_ruby_latest_imagestreams.py \ No newline at end of file diff --git a/3.3/test/test_ocp_s2i_imagestreams.py b/3.3/test/test_ocp_s2i_imagestreams.py new file mode 120000 index 00000000..3c4b5d99 --- /dev/null +++ b/3.3/test/test_ocp_s2i_imagestreams.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_imagestreams.py \ No newline at end of file diff --git a/3.3/test/test_ocp_s2i_integration.py b/3.3/test/test_ocp_s2i_integration.py new file mode 120000 index 00000000..01bb85c5 --- /dev/null +++ b/3.3/test/test_ocp_s2i_integration.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_integration.py \ No newline at end of file diff --git a/3.3/test/test_ocp_s2i_local_templates.py b/3.3/test/test_ocp_s2i_local_templates.py new file mode 120000 index 00000000..16ba9d8b --- /dev/null +++ b/3.3/test/test_ocp_s2i_local_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_local_templates.py \ No newline at end of file diff --git a/3.3/test/test_ocp_s2i_rails_ex_templates.py b/3.3/test/test_ocp_s2i_rails_ex_templates.py new file mode 120000 index 00000000..b5ce0d4d --- /dev/null +++ b/3.3/test/test_ocp_s2i_rails_ex_templates.py @@ -0,0 +1 @@ +../../test/test_ocp_s2i_rails_ex_templates.py \ No newline at end of file diff --git a/3.3/test/test_ruby_ex_standalone.py b/3.3/test/test_ruby_ex_standalone.py deleted file mode 120000 index cfca1c8a..00000000 --- a/3.3/test/test_ruby_ex_standalone.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ruby_ex_standalone.py \ No newline at end of file diff --git a/3.3/test/test_ruby_latest_imagestreams.py b/3.3/test/test_ruby_latest_imagestreams.py deleted file mode 120000 index f32f843f..00000000 --- a/3.3/test/test_ruby_latest_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_ruby_latest_imagestreams.py \ No newline at end of file diff --git a/3.3/test/test_s2i_imagestreams.py b/3.3/test/test_s2i_imagestreams.py deleted file mode 120000 index 00c872cb..00000000 --- a/3.3/test/test_s2i_imagestreams.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_imagestreams.py \ No newline at end of file diff --git a/3.3/test/test_s2i_integration.py b/3.3/test/test_s2i_integration.py deleted file mode 120000 index c7827e84..00000000 --- a/3.3/test/test_s2i_integration.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_integration.py \ No newline at end of file diff --git a/3.3/test/test_s2i_local_templates.py b/3.3/test/test_s2i_local_templates.py deleted file mode 120000 index c844e41f..00000000 --- a/3.3/test/test_s2i_local_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_local_templates.py \ No newline at end of file diff --git a/3.3/test/test_s2i_rails_ex_templates.py b/3.3/test/test_s2i_rails_ex_templates.py deleted file mode 120000 index 9df6ffd1..00000000 --- a/3.3/test/test_s2i_rails_ex_templates.py +++ /dev/null @@ -1 +0,0 @@ -../../test/test_s2i_rails_ex_templates.py \ No newline at end of file diff --git a/test/conftest.py b/test/conftest.py new file mode 100644 index 00000000..a3dd4210 --- /dev/null +++ b/test/conftest.py @@ -0,0 +1,78 @@ +import os + +import sys + +from pathlib import Path +from collections import namedtuple + +from container_ci_suite.utils import check_variables + +PSQL_TAGS = { + "rhel8": "-el8", + "rhel9": "-el9", + "rhel10": "-el10", +} +if not check_variables(): + sys.exit(1) + +TAGS = { + "rhel8": "-ubi8", + "rhel9": "-ubi9", + "rhel10": "-ubi10", +} +TEST_DIR = Path(__file__).parent.absolute() +APPS = [ + TEST_DIR / f"{x}test-app" + for x in [ + "", + "puma-", + "rack-", + ] +] +Vars = namedtuple( + "Vars", + [ + "OS", + "TAG", + "VERSION", + "IMAGE_NAME", + "SHORT_VERSION", + "TEST_DIR", + "APPS", + "BRANCH_TO_TEST", + "PSQL_TAG", + "PSQL_IMAGE_SHORT", + "PSQL_IMAGE_TAG", + ], +) +OS = os.getenv("TARGET").lower() +VERSION = os.getenv("VERSION") +PSQL_TAG = PSQL_TAGS.get(OS) +PSQL_IMAGE_SHORT = f"postgresql:12{PSQL_TAG}" +PSQL_IMAGE_TAG = f"12{PSQL_TAG}" +BRANCH_TO_TEST = "master" +if VERSION == "3.1" or VERSION == "3.3": + BRANCH_TO_TEST = "3.3" + +VARS = Vars( + OS=OS, + TAG=TAGS.get(OS), + VERSION=VERSION, + IMAGE_NAME=os.getenv("IMAGE_NAME"), + SHORT_VERSION=VERSION.replace(".", ""), + TEST_DIR=TEST_DIR, + APPS=APPS, + BRANCH_TO_TEST=BRANCH_TO_TEST, + PSQL_TAG=PSQL_TAGS.get(OS), + PSQL_IMAGE_SHORT=PSQL_IMAGE_SHORT, + PSQL_IMAGE_TAG=PSQL_IMAGE_TAG, +) + + +def fips_enabled(): + """ + Check if FIPS is enabled on the system. + """ + if os.path.exists("/proc/sys/crypto/fips_enabled"): + return Path("/proc/sys/crypto/fips_enabled").read_text() == "1" + return False diff --git a/test/constants.py b/test/constants.py deleted file mode 100644 index 784817bf..00000000 --- a/test/constants.py +++ /dev/null @@ -1,11 +0,0 @@ -TAGS = { - "rhel8": "-ubi8", - "rhel9": "-ubi9", - "rhel10": "-ubi10", -} - -PSQL_TAGS = { - "rhel8": "-el8", - "rhel9": "-el9", - "rhel10": "-el10", -} diff --git a/test/run-openshift-pytest b/test/run-openshift-pytest index dd20bdc6..0624e422 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 00000000..e69959ad --- /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 the MariaDB in format of X.Y +# 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 00000000..1034fa36 --- /dev/null +++ b/test/test_container_application.py @@ -0,0 +1,60 @@ +import os +import pytest + +from container_ci_suite.container_lib import ContainerTestLib +from container_ci_suite.utils import ContainerTestLibUtils +from container_ci_suite.engines.podman_wrapper import PodmanCLIWrapper + +from conftest import VARS + + +test_ports = PodmanCLIWrapper.podman_inspect( + field="{{range $key, $value := .Config.ExposedPorts }}{{$key}}{{end}}", + src_image=VARS.IMAGE_NAME, +) +print(f"The exposed ports are: {test_ports}") + +if "test-app" not in os.listdir(VARS.TEST_DIR): + ContainerTestLibUtils.run_command( + "git clone https://github.com/openshift/ruby-hello-world.git test-app" + ) + + +class TestRubyApplicationContainer: + @pytest.fixture( + scope="class", params=VARS.APPS, ids=[app.name for app in VARS.APPS] + ) + def build_s2i_app(self, request): + container_lib = ContainerTestLib(VARS.IMAGE_NAME) + app_name = request.param.name + s2i_app = container_lib.build_as_df( + app_path=request.param, + s2i_args="--pull-policy=never", + src_image=VARS.IMAGE_NAME, + dst_image=f"{VARS.IMAGE_NAME}-{app_name}", + ) + yield s2i_app + s2i_app.cleanup() + + def test_application(self, build_s2i_app): + """ + Test if container works under specific user + and not only with user --user 100001 + """ + cid_file_name = build_s2i_app.app_name + assert build_s2i_app.create_container( + cid_file_name=cid_file_name, container_args="--user 100001" + ) + cip = build_s2i_app.get_cip(cid_file_name=cid_file_name) + assert cip + # ruby --version returns proper version + assert ( + f"ruby {VARS.VERSION}." + in PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=f"{VARS.IMAGE_NAME}-{cid_file_name}", cmd="ruby --version" + ) + ) + # Response code from HTTP url is 200 + assert build_s2i_app.test_response( + url=f"http://{cip}", port=test_ports.split("/")[0] + ) diff --git a/test/test_container_basics.py b/test/test_container_basics.py new file mode 100644 index 00000000..c84adddc --- /dev/null +++ b/test/test_container_basics.py @@ -0,0 +1,117 @@ +import os + +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.utils import ContainerTestLibUtils + +from conftest import VARS + + +def build_npm_app(app_path: Path) -> ContainerTestLib: + """ + Build a S2I application. + """ + container_lib = ContainerTestLib(VARS.IMAGE_NAME) + s2i_app = container_lib.build_as_df( + app_path=app_path, + s2i_args="--pull-policy=never", + src_image=VARS.IMAGE_NAME, + dst_image=f"{VARS.IMAGE_NAME}-testapp", + ) + return s2i_app + + +class TestS2IRubyContainer: + """ + Test if container works properly + """ + + def setup_method(self): + """ + Setup the test environment. + """ + self.app = ContainerTestLib() + + def teardown_method(self): + """ + Cleanup the test environment. + """ + self.app.cleanup() + + def test_run_s2i_usage(self): + """ + Test if s2i usage works + """ + assert self.app.s2i_usage() + + def test_docker_run_usage(self): + """ + Test if container is runnable + """ + assert ( + PodmanCLIWrapper.call_podman_command( + cmd=f"run --rm {VARS.IMAGE_NAME} &>/dev/null", return_output=False + ) + == 0 + ) + + def test_scl_usage(self): + """ + Test if ruby --version returns proper output + """ + assert ( + f"ruby {VARS.VERSION}." + in PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=VARS.IMAGE_NAME, cmd="ruby --version" + ) + ) + + @pytest.mark.parametrize("dockerfile", ["Dockerfile", "Dockerfile.s2i"]) + def test_dockerfiles(self, dockerfile): + """ + Test if building nginx-container based on + examples/Dockerfile works + """ + assert self.app.build_test_container( + dockerfile=VARS.TEST_DIR / "examples/from-dockerfile" / dockerfile, + app_url=f"https://github.com/sclorg/rails-ex.git@{VARS.BRANCH_TO_TEST}", + 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 Rails application on OpenShift" + ) + + +class TestRubyNPMtestContainer: + """ + Test checks if NPM is valid and works properly + """ + + def setup_method(self): + """ + Setup the test environment. + """ + if "test-app" not in os.listdir(VARS.TEST_DIR): + ContainerTestLibUtils.run_command( + "git clone https://github.com/openshift/ruby-hello-world.git test-app" + ) + self.s2i_app = build_npm_app(VARS.TEST_DIR / "test-app") + + def teardown_method(self): + """ + Cleanup the test environment. + """ + 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_fips.py b/test/test_container_fips.py new file mode 100644 index 00000000..7f247161 --- /dev/null +++ b/test/test_container_fips.py @@ -0,0 +1,122 @@ +import pytest + +from pathlib import Path + +from container_ci_suite.container_lib import ContainerTestLib +from container_ci_suite.engines.podman_wrapper import PodmanCLIWrapper + +from conftest import VARS, fips_enabled + +fips_test_app = VARS.TEST_DIR / "test-fips" + + +def build_fips_test_app(app_path: Path) -> ContainerTestLib: + """ + Build a FIPS test application. + """ + container_lib = ContainerTestLib(VARS.IMAGE_NAME) + app_name = app_path.name + s2i_app = container_lib.build_as_df( + app_path=app_path, + s2i_args="--pull-policy=never", + src_image=VARS.IMAGE_NAME, + dst_image=f"{VARS.IMAGE_NAME}-{app_name}", + ) + return s2i_app + + +class TestRubyFipsModeContainer: + """ + Test if container works under specific user + and not only with user --user 100001 + """ + + def setup_method(self): + """ + Setup the test environment. + """ + self.app = ContainerTestLib() + + def teardown_method(self): + """ + Cleanup the test environment. + """ + self.app.cleanup() + + def test_fips_mode(self): + """ + Test if container works under specific user + and not only with user --user 10001 + """ + if VARS.OS == "rhel8": + pytest.skip("Do not execute on RHEL8") + if fips_enabled(): + output = PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name={VARS.IMAGE_NAME}, + cmd="ruby -ropenssl -e 'exit OpenSSL.fips_mode'", + ) + print(f"FIPS is enabled {output}") + assert output + else: + output = PodmanCLIWrapper.podman_run_command_and_remove( + cid_file_name=f"{VARS.IMAGE_NAME}-{self.app.app_name}", + cmd="ruby -ropenssl -e 'exit !OpenSSL.fips_mode'", + ) + print(f"FIPS is disable {output}") + assert not output + + +class TestRubyFipsApplicationContainer: + """ + Test if container works under specific user + and not only with user --user 100001 + """ + + def setup_method(self): + """ + Setup the test environment. + """ + self.fips_app = build_fips_test_app(app_path=fips_test_app) + + def teardown_method(self): + """ + Cleanup the test environment. + """ + if self.fips_app: + self.fips_app.cleanup() + + def test_application(self): + """ + Test if container works under specific user + and not only with user --user 100001 + """ + if VARS.OS == "rhel8": + pytest.skip("Do not execute on RHEL8") + cid_file_name = self.fips_app.app_name + assert self.fips_app.create_container( + cid_file_name=cid_file_name, container_args="--user 100001" + ) + cid = self.fips_app.get_cid(cid_file_name=cid_file_name) + assert cid + cip = self.fips_app.get_cip(cid_file_name=cid_file_name) + assert cip + assert self.fips_app.test_response( + url=f"http://{cip}", + page="/symmetric/aes-256-cbc", + debug=True, + ) + assert self.fips_app.test_response( + url=f"http://{cip}", + page="/symmetric/des-ede-cbc", + debug=True, + ) + assert self.fips_app.test_response( + url=f"http://{cip}", + page="/hash/sha256", + debug=True, + ) + assert self.fips_app.test_response( + url=f"http://{cip}", + page="/hash/md5", + debug=True, + ) diff --git a/test/test_helm_ruby_rails_application.py b/test/test_helm_ruby_rails_application.py deleted file mode 100644 index 2854ef76..00000000 --- a/test/test_helm_ruby_rails_application.py +++ /dev/null @@ -1,60 +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") - - -TAG = TAGS.get(OS) - - -class TestHelmCakePHPTemplate: - - def setup_method(self): - package_name = "redhat-ruby-rails-application" - path = test_dir - self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=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" - ) - - def teardown_method(self): - self.hc_api.delete_project() - - def test_by_helm_test(self): - rails_ex_branch = "master" - if VERSION == "3.3": - rails_ex_branch = VERSION - self.hc_api.package_name = "redhat-ruby-imagestreams" - assert self.hc_api.helm_package() - assert self.hc_api.helm_installation() - self.hc_api.package_name = "redhat-ruby-rails-application" - assert self.hc_api.helm_package() - assert self.hc_api.helm_installation( - values={ - "ruby_version": f"{VERSION}{TAG}", - "namespace": self.hc_api.namespace, - "source_repository_ref": rails_ex_branch, - } - ) - assert self.hc_api.is_s2i_pod_running(pod_name_prefix="rails-example") - assert self.hc_api.test_helm_chart(expected_str=["Welcome to your Rails application"]) diff --git a/test/test_helm_ruby_imagestreams.py b/test/test_ocp_helm_ruby_imagestreams.py similarity index 61% rename from test/test_helm_ruby_imagestreams.py rename to test/test_ocp_helm_ruby_imagestreams.py index c20f2992..f3217ac4 100644 --- a/test/test_helm_ruby_imagestreams.py +++ b/test/test_ocp_helm_ruby_imagestreams.py @@ -1,35 +1,24 @@ -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__))) - -VERSION = os.getenv("VERSION") -IMAGE_NAME = os.getenv("IMAGE_NAME") -OS = os.getenv("TARGET") +from conftest import VARS class TestHelmRHELRubyImageStreams: - def setup_method(self): package_name = "redhat-ruby-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" + repo_url="https://github.com/sclorg/helm-charts", + repo_name="helm-charts", + subdir="charts/redhat", ) def teardown_method(self): @@ -49,6 +38,12 @@ 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 + assert ( + self.hc_api.check_imagestreams(version=version, registry=registry) + == expected + ) diff --git a/test/test_ocp_helm_ruby_rails_application.py b/test/test_ocp_helm_ruby_rails_application.py new file mode 100644 index 00000000..3531c3fc --- /dev/null +++ b/test/test_ocp_helm_ruby_rails_application.py @@ -0,0 +1,55 @@ +from container_ci_suite.helm import HelmChartsAPI + +from conftest import VARS + + +class TestHelmCakePHPTemplate: + """ + Test checks if Helm imagestream and Helm ruby rails application + works properly and response is as expected. + """ + + def setup_method(self): + """ + Setup the test environment. + """ + package_name = "redhat-ruby-rails-application" + 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", + ) + + def teardown_method(self): + """ + Teardown the test environment. + """ + self.hc_api.delete_project() + + def test_by_helm_test(self): + """ + Test checks if Helm imagestream and Helm ruby rails application + works properly and response is as expected. + """ + self.hc_api.package_name = "redhat-ruby-imagestreams" + assert self.hc_api.helm_package() + assert self.hc_api.helm_installation() + self.hc_api.package_name = "redhat-ruby-rails-application" + assert self.hc_api.helm_package() + assert self.hc_api.helm_installation( + values={ + "ruby_version": f"{VARS.VERSION}{VARS.TAG}", + "namespace": self.hc_api.namespace, + "source_repository_ref": VARS.BRANCH_TO_TEST, + } + ) + assert self.hc_api.is_s2i_pod_running(pod_name_prefix="rails-example") + assert self.hc_api.test_helm_chart( + expected_str=["Welcome to your Rails application"] + ) diff --git a/test/test_ocp_ruby_ex_standalone.py b/test/test_ocp_ruby_ex_standalone.py new file mode 100644 index 00000000..10332840 --- /dev/null +++ b/test/test_ocp_ruby_ex_standalone.py @@ -0,0 +1,40 @@ +from container_ci_suite.openshift import OpenShiftAPI + +from conftest import VARS + + +class TestS2IRailsExTemplate: + """ + Test checks if Ruby ex standalone template works properly and response is as expected. + """ + + def setup_method(self): + """ + Setup the test environment. + """ + self.oc_api = OpenShiftAPI( + pod_name_prefix=f"ruby-{VARS.SHORT_VERSION}-testing", version=VARS.VERSION + ) + + def teardown_method(self): + """ + Teardown the test environment. + """ + self.oc_api.delete_project() + + def test_dancer_ex_template_inside_cluster(self): + """ + Test checks if Ruby ex standalone template works properly and response is as expected. + """ + service_name = f"ruby-{VARS.SHORT_VERSION}-testing" + assert self.oc_api.deploy_s2i_app( + image_name=VARS.IMAGE_NAME, + app=f"https://github.com/sclorg/rails-ex#{VARS.BRANCH_TO_TEST}", + context=".", + service_name=service_name, + ) + 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="Welcome to your Rails application", + ) diff --git a/test/test_ocp_ruby_latest_imagestreams.py b/test/test_ocp_ruby_latest_imagestreams.py new file mode 100644 index 00000000..f04ac096 --- /dev/null +++ b/test/test_ocp_ruby_latest_imagestreams.py @@ -0,0 +1,23 @@ +from container_ci_suite.imagestreams import ImageStreamChecker + +from conftest import VARS + + +class TestLatestImagestreams: + """ + Test checks if local imagestreams are the latest one + """ + + def setup_method(self): + """ + Setup the test environment. + """ + 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_ocp_s2i_imagestreams.py b/test/test_ocp_s2i_imagestreams.py new file mode 100644 index 00000000..7030e6d5 --- /dev/null +++ b/test/test_ocp_s2i_imagestreams.py @@ -0,0 +1,42 @@ +from container_ci_suite.openshift import OpenShiftAPI + +from conftest import VARS + + +class TestRubyImagestreams: + """ + Test checks if Ruby imagestreams work properly + """ + + def setup_method(self): + """ + Setup the test environment. + """ + self.oc_api = OpenShiftAPI( + pod_name_prefix=f"ruby-{VARS.SHORT_VERSION}-testing", + version=VARS.VERSION, + shared_cluster=True, + ) + + def teardown_method(self): + """ + Teardown the test environment. + """ + self.oc_api.delete_project() + + def ruby_deploy_imagestream(self): + """ + Test checks if Ruby imagestreams work properly + """ + service_name = f"ruby-{VARS.SHORT_VERSION}-testing" + assert self.oc_api.deploy_imagestream_s2i( + imagestream_file=f"{VARS.VERSION}/imagestreams/ruby-rhel.json", + image_name=VARS.IMAGE_NAME, + app="https://github.com/sclorg/s2i-ruby-container.git", + context=f"{VARS.VERSION}/test/puma-test-app", + service_name=service_name, + ) + 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="Hello world!" + ) diff --git a/test/test_ocp_s2i_integration.py b/test/test_ocp_s2i_integration.py new file mode 100644 index 00000000..92fb5b4a --- /dev/null +++ b/test/test_ocp_s2i_integration.py @@ -0,0 +1,41 @@ +from container_ci_suite.openshift import OpenShiftAPI + +from conftest import VARS + + +class TestS2IRubyTemplate: + """ + Test checks if Ruby s2i integration works properly + """ + + def setup_method(self): + """ + Setup the test environment. + """ + self.oc_api = OpenShiftAPI( + pod_name_prefix=f"ruby-{VARS.SHORT_VERSION}-testing", + version=VARS.VERSION, + shared_cluster=True, + ) + + def teardown_method(self): + """ + Teardown the test environment. + """ + self.oc_api.delete_project() + + def test_rails_template_inside_cluster(self): + """ + Test checks if Ruby s2i integration works properly + """ + service_name = f"ruby-{VARS.SHORT_VERSION}-testing" + assert self.oc_api.deploy_s2i_app( + image_name=VARS.IMAGE_NAME, + app="https://github.com/sclorg/s2i-ruby-container.git", + context=f"{VARS.VERSION}/test/puma-test-app", + service_name=service_name, + ) + 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="Hello world!" + ) diff --git a/test/test_ocp_s2i_local_templates.py b/test/test_ocp_s2i_local_templates.py new file mode 100644 index 00000000..06d2ef5b --- /dev/null +++ b/test/test_ocp_s2i_local_templates.py @@ -0,0 +1,72 @@ +import pytest + +from container_ci_suite.openshift import OpenShiftAPI + +from conftest import VARS + + +DEPLOYED_PGSQL_IMAGE = "quay.io/sclorg/postgresql-12-c8s" + + +class TestS2IRailsExTemplate: + """ + Test checks if Ruby s2i local templates work properly + """ + + def setup_method(self): + """ + Setup the test environment. + """ + self.oc_api = OpenShiftAPI( + pod_name_prefix=f"ruby-{VARS.SHORT_VERSION}-testing", + version=VARS.VERSION, + shared_cluster=True, + ) + + def teardown_method(self): + """ + Teardown the test environment. + """ + self.oc_api.delete_project() + + @pytest.mark.parametrize( + "template", + [ + "rails.json", + # "rails-postgresql-persistent.json" + ], + ) + def test_rails_template_inside_cluster(self, template): + """ + Test checks if Ruby s2i local templates work properly + """ + assert self.oc_api.upload_image(DEPLOYED_PGSQL_IMAGE, VARS.PSQL_IMAGE_SHORT) + service_name = f"ruby-{VARS.SHORT_VERSION}-testing" + template_url = f"examples/{template}" + openshift_args = [ + "SOURCE_REPOSITORY_URL=https://github.com/sclorg/rails-ex.git", + f"SOURCE_REPOSITORY_REF={VARS.BRANCH_TO_TEST}", + f"RUBY_VERSION={VARS.VERSION}", + f"NAME={service_name}", + ] + if template != "rails.json": + openshift_args = [ + "SOURCE_REPOSITORY_URL=https://github.com/sclorg/rails-ex.git", + f"SOURCE_REPOSITORY_REF={VARS.BRANCH_TO_TEST}", + f"POSTGRESQL_VERSION={VARS.PSQL_IMAGE_TAG}", + f"RUBY_VERSION={VARS.VERSION}", + f"NAME={service_name}", + "DATABASE_USER=testu", + "DATABASE_PASSWORD=testp", + ] + assert self.oc_api.deploy_template_with_image( + image_name=VARS.IMAGE_NAME, + template=template_url, + name_in_template="ruby", + 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="Welcome to your Rails application", + ) diff --git a/test/test_ocp_s2i_rails_ex_templates.py b/test/test_ocp_s2i_rails_ex_templates.py new file mode 100644 index 00000000..6dc9f5b0 --- /dev/null +++ b/test/test_ocp_s2i_rails_ex_templates.py @@ -0,0 +1,68 @@ +import pytest + +from container_ci_suite.openshift import OpenShiftAPI + +from conftest import VARS + + +DEPLOYED_PGSQL_IMAGE = "quay.io/sclorg/postgresql-12-c8s" + + +class TestS2IRailsExTemplate: + def setup_method(self): + self.oc_api = OpenShiftAPI( + pod_name_prefix=f"ruby-{VARS.SHORT_VERSION}-testing", + version=VARS.VERSION, + shared_cluster=True, + ) + + def teardown_method(self): + self.oc_api.delete_project() + + # https://github.com/sclorg/s2i-ruby-container/issues/588 + @pytest.mark.parametrize( + "template", + [ + "rails.json", + # "rails-postgresql-persistent.json" + ], + ) + def test_rails_template_inside_cluster(self, template): + """ + Test checks if Ruby s2i Rails ex templates work properly + """ + assert self.oc_api.upload_image(DEPLOYED_PGSQL_IMAGE, VARS.PSQL_IMAGE_SHORT) + service_name = f"ruby-{VARS.SHORT_VERSION}-testing" + template_url = self.oc_api.get_raw_url_for_json( + container="rails-ex", + dir="openshift/templates", + filename=template, + branch=VARS.BRANCH_TO_TEST, + ) + openshift_args = [ + "SOURCE_REPOSITORY_URL=https://github.com/sclorg/rails-ex.git", + f"SOURCE_REPOSITORY_REF={VARS.BRANCH_TO_TEST}", + f"RUBY_VERSION={VARS.VERSION}", + f"NAME={service_name}", + ] + if template != "rails.json": + openshift_args = [ + "SOURCE_REPOSITORY_URL=https://github.com/sclorg/rails-ex.git", + f"SOURCE_REPOSITORY_REF={VARS.BRANCH_TO_TEST}", + f"POSTGRESQL_VERSION={VARS.PSQL_IMAGE_TAG}", + f"RUBY_VERSION={VARS.VERSION}", + f"NAME={service_name}", + "DATABASE_USER=testu", + "DATABASE_PASSWORD=testp", + ] + assert self.oc_api.deploy_template_with_image( + image_name=VARS.IMAGE_NAME, + template=template_url, + name_in_template="ruby", + 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="Welcome to your Rails application", + ) diff --git a/test/test_ruby_ex_standalone.py b/test/test_ruby_ex_standalone.py deleted file mode 100644 index d22bc6e1..00000000 --- a/test/test_ruby_ex_standalone.py +++ /dev/null @@ -1,42 +0,0 @@ -import os -import sys - -import pytest - -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") - -SHORT_VERSION = "".join(VERSION.split(".")) - -# Replacement with 'test_python_s2i_app_ex' -class TestS2IRailsExTemplate: - - def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix=f"ruby-{SHORT_VERSION}-testing", version=VERSION) - - def teardown_method(self): - self.oc_api.delete_project() - - def test_dancer_ex_template_inside_cluster(self): - service_name = f"ruby-{SHORT_VERSION}-testing" - rails_ex_branch = "master" - if VERSION == "3.3": - rails_ex_branch = VERSION - assert self.oc_api.deploy_s2i_app( - image_name=IMAGE_NAME, app=f"https://github.com/sclorg/rails-ex#{rails_ex_branch}", - context=".", - service_name=service_name - ) - 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="Welcome to your Rails application" - ) diff --git a/test/test_ruby_latest_imagestreams.py b/test/test_ruby_latest_imagestreams.py deleted file mode 100644 index 70aa92ac..00000000 --- a/test/test_ruby_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_s2i_imagestreams.py b/test/test_s2i_imagestreams.py deleted file mode 100644 index d41ddbed..00000000 --- a/test/test_s2i_imagestreams.py +++ /dev/null @@ -1,41 +0,0 @@ -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(".")) - - -class TestRubyImagestreams: - - def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix=f"ruby-{SHORT_VERSION}-testing", version=VERSION, shared_cluster=True) - - def teardown_method(self): - self.oc_api.delete_project() - - def ruby_deploy_imagestream(self): - service_name = f"ruby-{SHORT_VERSION}-testing" - assert self.oc_api.deploy_imagestream_s2i( - imagestream_file=f"{VERSION}/imagestreams/ruby-rhel.json", - image_name=IMAGE_NAME, - app="https://github.com/sclorg/s2i-ruby-container.git", - context=f"{VERSION}/test/puma-test-app" - ) - 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="Hello world!" - ) diff --git a/test/test_s2i_integration.py b/test/test_s2i_integration.py deleted file mode 100644 index f28ad854..00000000 --- a/test/test_s2i_integration.py +++ /dev/null @@ -1,37 +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") - -SHORT_VERSION = "".join(VERSION.split(".")) - -# Replacement with 'test_python_s2i_app_ex' -class TestS2IRubyTemplate: - - def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix=f"ruby-{SHORT_VERSION}-testing", version=VERSION, shared_cluster=True) - - def teardown_method(self): - self.oc_api.delete_project() - - def test_rails_template_inside_cluster(self): - service_name = f"ruby-{SHORT_VERSION}-testing" - assert self.oc_api.deploy_s2i_app( - image_name=IMAGE_NAME, app=f"https://github.com/sclorg/s2i-ruby-container.git", - context=f"{VERSION}/test/puma-test-app", - service_name=service_name - ) - 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="Hello world!" - ) diff --git a/test/test_s2i_local_templates.py b/test/test_s2i_local_templates.py deleted file mode 100644 index ef0967c6..00000000 --- a/test/test_s2i_local_templates.py +++ /dev/null @@ -1,78 +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, PSQL_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") - -DEPLOYED_PGSQL_IMAGE = "quay.io/sclorg/postgresql-12-c8s" - -TAG = TAGS.get(OS) -PSQL_TAG = PSQL_TAGS.get(OS) -IMAGE_SHORT = f"postgresql:12{PSQL_TAG}" -IMAGE_TAG = f"12{PSQL_TAG}" - -SHORT_VERSION = "".join(VERSION.split(".")) - - -class TestS2IRailsExTemplate: - - def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix=f"ruby-{SHORT_VERSION}-testing", version=VERSION, shared_cluster=True) - - def teardown_method(self): - self.oc_api.delete_project() - - # # https://github.com/sclorg/s2i-ruby-container/issues/588 - @pytest.mark.parametrize( - "template", - [ - "rails.json", - # "rails-postgresql-persistent.json" - ] - ) - def test_rails_template_inside_cluster(self, template): - assert self.oc_api.upload_image(DEPLOYED_PGSQL_IMAGE, IMAGE_SHORT) - service_name = f"ruby-{SHORT_VERSION}-testing" - rails_ex_branch = "master" - if VERSION == "3.3": - rails_ex_branch = VERSION - template_url = f"examples/{template}" - openshift_args = [ - f"SOURCE_REPOSITORY_URL=https://github.com/sclorg/rails-ex.git", - f"SOURCE_REPOSITORY_REF={rails_ex_branch}", - f"RUBY_VERSION={VERSION}", - f"NAME={service_name}" - ] - if template != "rails.json": - openshift_args = [ - f"SOURCE_REPOSITORY_URL=https://github.com/sclorg/rails-ex.git", - f"SOURCE_REPOSITORY_REF={rails_ex_branch}", - f"POSTGRESQL_VERSION={IMAGE_TAG}", - f"RUBY_VERSION={VERSION}", - f"NAME={service_name}", - 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="ruby", - 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="Welcome to your Rails application" - ) diff --git a/test/test_s2i_rails_ex_templates.py b/test/test_s2i_rails_ex_templates.py deleted file mode 100644 index 97eb8536..00000000 --- a/test/test_s2i_rails_ex_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, PSQL_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") - -DEPLOYED_PGSQL_IMAGE = "quay.io/sclorg/postgresql-12-c8s" - -TAG = TAGS.get(OS) -PSQL_TAG = PSQL_TAGS.get(OS) -IMAGE_SHORT = f"postgresql:12{PSQL_TAG}" -IMAGE_TAG = f"12{PSQL_TAG}" - -SHORT_VERSION = "".join(VERSION.split(".")) - - -class TestS2IRailsExTemplate: - - def setup_method(self): - self.oc_api = OpenShiftAPI(pod_name_prefix=f"ruby-{SHORT_VERSION}-testing", version=VERSION, shared_cluster=True) - - def teardown_method(self): - self.oc_api.delete_project() - - # https://github.com/sclorg/s2i-ruby-container/issues/588 - @pytest.mark.parametrize( - "template", - [ - "rails.json", - # "rails-postgresql-persistent.json" - ] - ) - def test_rails_template_inside_cluster(self, template): - assert self.oc_api.upload_image(DEPLOYED_PGSQL_IMAGE, IMAGE_SHORT) - service_name = f"ruby-{SHORT_VERSION}-testing" - rails_ex_branch = "master" - if VERSION == "3.3": - rails_ex_branch = VERSION - template_url = self.oc_api.get_raw_url_for_json( - container="rails-ex", dir="openshift/templates", filename=template, branch=rails_ex_branch - ) - openshift_args = [ - f"SOURCE_REPOSITORY_URL=https://github.com/sclorg/rails-ex.git", - f"SOURCE_REPOSITORY_REF={rails_ex_branch}", - f"RUBY_VERSION={VERSION}", - f"NAME={service_name}" - ] - if template != "rails.json": - openshift_args = [ - f"SOURCE_REPOSITORY_URL=https://github.com/sclorg/rails-ex.git", - f"SOURCE_REPOSITORY_REF={rails_ex_branch}", - f"POSTGRESQL_VERSION={IMAGE_TAG}", - f"RUBY_VERSION={VERSION}", - f"NAME={service_name}", - 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="ruby", - 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="Welcome to your Rails application" - )