Ejemplo n.º 1
0
 def test_compare_app_list_with_cf(self, core_space):
     step("Get application list from platform")
     platform_app_list = Application.api_get_list(core_space.guid)
     step("Get application list from cf")
     cf_app_list = Application.cf_api_get_list_by_space(core_space.guid)
     step("Compare app lists from platform and cf")
     assert sorted(platform_app_list) == sorted(cf_app_list)
Ejemplo n.º 2
0
 def test_delete_app_with_bound_service(self, test_space, sample_python_app,
                                        test_instance):
     step("Check that the app can be deleted")
     sample_python_app.api_delete()
     apps = Application.api_get_list(test_space.guid)
     assert sample_python_app not in apps
     step("Check that the instance can be deleted")
     test_instance.api_delete()
     instances = ServiceInstance.api_get_list(space_guid=test_space.guid)
     assert test_instance not in instances
Ejemplo n.º 3
0
    def appstack(cls, core_space):
        cls.step("Retrieve apps, services, and brokers present in cf")
        cls.cf_apps = Application.cf_api_get_list_by_space(core_space.guid)
        cls.cf_upsi = [
            s for s in Upsi.cf_api_get_list()
            if s.space_guid == core_space.guid
        ]
        cls.cf_brokers = ServiceBroker.cf_api_get_list(core_space.guid)

        cls.step("Retrieve apps and services present on the Platform")
        cls.platform_apps = Application.api_get_list(core_space.guid)
        cls.platform_instances = ServiceInstance.api_get_list(core_space.guid)
    def test_8_delete_app(self, test_space):
        """
        <b>Description:</b>
        Check that mongodb api application can be deleted.

        <b>Input data:</b>
        No input data.

        <b>Expected results:</b>
        Test passes if mongodb api application can be deleted successfully.

        <b>Steps:</b>
        1. Delete mongodb api application.
        2. Get application list.
        3. Check that mongodb api application is no longer present in application list.
        """
        step("Delete application")
        self.mongodb_app.api_delete()
        step("Check that application is not on the list")
        apps = Application.api_get_list(test_space.guid)
        assert self.mongodb_app not in apps
Ejemplo n.º 5
0
def core_atk_app(core_space):
    app_list = Application.api_get_list(core_space.guid)
    atk_app = next((app for app in app_list if app.name == ServiceLabels.ATK), None)
    assert atk_app is not None, "Atk not found in core space"
    return atk_app
 def get_apps(cls, core_space):
     cls.platform_apps = Application.api_get_list(core_space.guid)
Ejemplo n.º 7
0
 def test_0_get_reference_atk_bindings(self, core_space):
     step("Get services bound to atk in the reference space")
     ref_atk_app = next((a for a in Application.api_get_list(core_space.guid) if a.name == "atk"), None)
     assert ref_atk_app is not None, "ATK app not found in the reference space"
     self.__class__.atk_bindings = [s[0]["label"] for s in ref_atk_app.cf_api_env()["VCAP_SERVICES"].values()]