Example #1
0
    def test_change_branch(self, instance):
        params = {'input.app-branch': 'red'}
        instance.reconfigure(parameters=params)
        assert instance.ready(timeout=20)

        check_site()
        resp = requests.get(self.url)

        assert 'Updated PetClinic :: a Spring Framework demonstration' in resp.text
Example #2
0
    def test_change_branch(self, instance):
        params = {'input.app-branch': 'red'}
        instance.reconfigure(parameters=params)
        assert instance.ready(timeout=20)

        check_site()
        resp = requests.get(self.url)

        assert 'Updated PetClinic :: a Spring Framework demonstration' in resp.text
Example #3
0
    def test_scaling(self, instance):
        assert len(instance.returnValues['endpoints.app']) == 1
        params = {'input.app-quantity': '2'}
        instance.reconfigure(parameters=params)
        assert instance.ready(timeout=20)

        check_site(instance)
        # Check we have 2 hosts up
        @eventually(AssertionError, KeyError)
        def eventually_assert():
            assert len(instance.returnValues['endpoints.app']) == 2
        eventually_assert()
Example #4
0
    def test_scaling(self, instance):
        assert len(instance.returnValues['endpoints.app']) == 1
        params = {'input.app-quantity': '2'}
        instance.reconfigure(parameters=params)
        assert instance.ready(timeout=20)

        check_site(instance)
        # Check we have 2 hosts up
        @eventually(AssertionError, KeyError)
        def eventually_assert():
            assert len(instance.returnValues['endpoints.app']) == 2
        eventually_assert()