{"id":21273271,"url":"https://github.com/sclorg/container-ci-suite","last_synced_at":"2026-01-23T14:48:44.894Z","repository":{"id":50333089,"uuid":"271253468","full_name":"sclorg/container-ci-suite","owner":"sclorg","description":"This repos is used for testing RHSCL containers","archived":false,"fork":false,"pushed_at":"2024-10-24T14:32:55.000Z","size":258,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-25T04:25:14.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sclorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-10T11:00:43.000Z","updated_at":"2024-10-24T14:34:32.000Z","dependencies_parsed_at":"2023-11-23T09:28:53.994Z","dependency_job_id":"6d9d183e-6eb8-43f4-a916-add9a8c39cd8","html_url":"https://github.com/sclorg/container-ci-suite","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sclorg%2Fcontainer-ci-suite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sclorg%2Fcontainer-ci-suite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sclorg%2Fcontainer-ci-suite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sclorg%2Fcontainer-ci-suite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sclorg","download_url":"https://codeload.github.com/sclorg/container-ci-suite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225700924,"owners_count":17510448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T09:13:16.405Z","updated_at":"2026-01-23T14:48:44.850Z","avatar_url":"https://github.com/sclorg.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# container-ci-suite\n\n[![Run Tox tests on container-ci-suite](https://github.com/sclorg/container-ci-suite/actions/workflows/python-tests.yml/badge.svg)](https://github.com/sclorg/container-ci-suite/actions/workflows/python-tests.yml)\n\n\nThis repo is used for testing SCL containers. For container execution `docker` or `podman` commands are used.\nNo Python bidings. The same for OpenShift tests. `oc` command is used.\n\n##  How to use Container CI Suite for testing containers\n\nInstall this suite by command:\n\n```bash\npip3 install git+https://github.com/phracek/container-ci-suite\n```\n\n### Run a test with Container-CI-Suite\n\n```python\nimport os\n\nimport pytest\n\nfrom container_ci_suite.container import ContainerAPI\n\nimage_name = os.environ.get(\"IMAGE_NAME\", \"nginx-container\")\ntest_dir = os.path.abspath(os.path.dirname(__file__))\n\n\nclass TestDummyImage(object):\n    def test_s2i_usage(self):\n        ccs = ContainerAPI(image_name=image_name)\n        ccs.s2i_usage()\n\n```\n\n### Run a test with Container-CI-Suite for Example repositories\n\n```python\nimport os\n\nimport pytest\n\nfrom container_ci_suite.openshift import OpenShiftAPI\n\ntest_dir = os.path.abspath(os.path.dirname(__file__))\n\nIS_RUBY = OpenShiftAPI.get_raw_url_for_json(container=\"s2i-ruby-container\", dir=\"imagestreams\", filename=\"ruby-rhel.json\")\nIS_POSTGRESQL = OpenShiftAPI.get_raw_url_for_json(container=\"postgresql-container\", dir=\"imagestreams\", filename=\"postgresql-rhel.json\")\nTEMPLATE_RAILS_POSTGRESQL = OpenShiftAPI.get_raw_url_for_json(container=\"s2i-ruby-container\", dir=\"examples\", filename=\"rails-postgresql-persistent.json\")\n\nclass TestRubyEx:\n    def setup_method(self):\n        self.oc_api = OpenShiftAPI(namespace=\"test-ruby-ex\")\n\n    # Reference https://github.com/sclorg/s2i-nodejs-container/blob/master/test/test-lib-nodejs.sh#L561 (ct_os_test_template_app_func)\n    def test_deployment_template(self):\n        self.oc_api.create(IS_RUBY)\n        self.oc_api.create(IS_POSTGRESQL)\n        assert self.oc_api.check_is_exists(is_name=\"ruby\", version_to_check=\"2.5-ubi8\")\n        assert self.oc_api.check_is_exists(is_name=\"postgresql\", version_to_check=\"10-el8\")\n        self.oc_api.process_file(TEMPLATE_RAILS_POSTGRESQL)\n        self.oc_api.new_app(image_name=\"ruby:2.5-ubi8\", github_repo=\"https://github.com/sclorg/ruby-ex\")\n        self.oc_api.is_pod_ready(pod_name=\"\")\n        self.oc_api.ct_os_check_service_image_info()\n        #oc process -f rails-postgresql.json -p NAMESPACE=$(oc project -q) | oc create -f -\n\n    # Reference https://github.com/sclorg/s2i-nodejs-container/blob/master/test/test-lib-nodejs.sh#L554 (ct_os_test_s2i_app_func)\n    # ct_os_deploy_s2i_image\n    def test_s2i_app_func(self):\n        self.oc_api.create(IS_RUBY)\n        self.oc_api.create(IS_POSTGRESQL)\n        assert self.oc_api.check_is_exists(is_name=\"ruby\", version_to_check=\"2.5-ubi8\")\n        assert self.oc_api.check_is_exists(is_name=\"postgresql\", version_to_check=\"10-el8\")\n        self.oc_api.process_file(TEMPLATE_RAILS_POSTGRESQL)\n        self.oc_api.new_app(\"ruby-ex-tests/ruby:2.5-ubi8~https://github.com/sclorg/ruby-ex\")\n        self.oc_api.start-build() # service-name, --from-dir\n        self.oc_api.is_pod_ready()\n        self.oc_api.ct_os_check_service_image_info()\n        #oc process -f rails-postgresql.json -p NAMESPACE=$(oc project -q) | oc create -f -\n\n    # Reference https://github.com/sclorg/s2i-nodejs-container/blob/master/test/test-lib-nodejs.sh#L533 (ct_os_test_image_stream_quickstart)\n    # ct_os_deploy_s2i_image\n    def test_iamgestream_quicstart(self):\n        self.oc_api.create(IS_RUBY)\n        self.oc_api.create(IS_POSTGRESQL)\n        assert self.oc_api.check_is_exists(is_name=\"ruby\", version_to_check=\"2.5-ubi8\")\n        assert self.oc_api.check_is_exists(is_name=\"postgresql\", version_to_check=\"10-el8\")\n        self.oc_api.process_file(TEMPLATE_RAILS_POSTGRESQL)\n        self.oc_api.create()\n        self.oc_api.ct_os_test_template_app(\"ruby-ex-tests/ruby:2.5-ubi8~https://github.com/sclorg/ruby-ex\")\n        self.oc_api.start-build() # service-name, --from-dir\n        self.oc_api.is_pod_ready()\n        self.oc_api.ct_os_check_service_image_info()\n        #oc process -f rails-postgresql.json -p NAMESPACE=$(oc project -q) | oc create -f -\n\n```\n\n## Run a test with Container-CI-Suite for Helm charts\n\n```python\nimport os\n\nimport pytest\n\nfrom container_ci_suite.helm import HelmChartsAPI\n\ntest_dir = os.path.abspath(os.path.dirname(__file__))\n\n\nclass TestHelmPostgresqlImageStreams:\n    def setup_method(self):\n        package_name = \"postgresql-imagestreams\"\n        path = os.path.join(test_dir, \"../charts/redhat\", package_name)\n        self.hc_api = HelmChartsAPI(path=path, package_name=package_name)\n    def test_package_imagestream(self):\n        self.hc_api.helm_package()\n\n```\n\n## Container functions onboarding\n\n- [] ct_init - call `ct_enable_cleanup`, creates temp dir for app_id and cid_files\n- [] ct_cleanup - call `ct_clean_app_images`, and `ct_clean_container`\n- [] ct_build_image_and_parse_id -\n- [x] ct_container_running - ContainerCISuite.is_container_running - used for cleaning containers only\n- [x] ct_container_exists - ContainerCISuite.is_container_exists - used for cleaning containers only\n- [] ct_clean_app_images\n- [x] ct_clean_containers - ContainerCISuite.cleanup_container\n- [] ct_show_results\n- [] ct_enable_cleanup\n- [] ct_trap_on_exit\n- [] ct_trap_on_sigint\n- [x] ct_pull_image - PodmanCLIWrapper.docker_pull_image\n- [] ct_check_envs_set\n- [] ct_get_cid\n- [x] ct_get_cip - ContainerCISuite.get_cip\n- [x] ct_wait_for_cid - ContainerCISuite.wait_for_cid\n- [x] ct_assert_container_creation_fails - ContainerCISuite.assert_container_fails\n- [x] ct_create_container - ContainerCISuite.create_container\n- [] ct_scl_usage_old\n- [] ct_doc_content_old\n- [x] full_ca_file_path - utils.get_full_ca_file_path\n- [x] ct_mount_ca_file - utils.get_mount_ca_file\n- [x] ct_build_s2i_npm_variables - utils.get_npm_variables\n- [x] ct_npm_works - ContainerCISuite.npm_works\n- [x] ct_binary_found_from_df - ContainerCISuite.binary_found_from_df\n- [x] ct_check_exec_env_vars - ContainerCISuite.test_check_exec_env_vars\n- [x] ct_check_scl_enable_vars - ContainerCISuite.test_check_envs_set\n- [] ct_path_append\n- [] ct_path_foreach\n- [] ct_gen_self_signed_cert_pem\n- [] ct_obtain_input -\n- [x] ct_test_response - UPDATE NEEDED utils.get_response_request\n- [x] ct_registry_from_os - utils.get_registry_name\n- [x] ct_get_public_image_name - utils.get_public_image_name\n- [] ct_assert_cmd_success\n- [] ct_assert_cmd_failure\n- [] ct_random_string\n- [x] ct_s2i_usage - ContainerCISuite.s2i_usage\n- [x] ct_s2i_build_as_df - ContainerCISuite.s2i_build_as_df\n- [x] ct_s2i_build_as_df_build_args - ContainerCISuite.s2i_create_df\n- [] ct_s2i_multistage_build\n- [x] ct_check_image_availability - ContainerCISuite.check_image_availability\n- [] ct_show_resources\n- [] ct_clone_git_repository\n- [] ct_get_uid_from_image\n- [] ct_test_app_dockerfile\n- [] ct_check_testcase_result\n- [] ct_update_test_result\n- [] ct_run_tests_from_testset\n- [] ct_timestamp_s\n- [] ct_timestamp_pretty\n- [] ct_timestamp_diff\n- [] ct_get_certificate_timestamp\n- [] ct_get_certificate_age_s\n- [] ct_get_image_age_s\n- [] ct_get_image_size_uncompresseed\n- [] ct_get_image_size_compresseed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsclorg%2Fcontainer-ci-suite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsclorg%2Fcontainer-ci-suite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsclorg%2Fcontainer-ci-suite/lists"}