Ejemplo n.º 1
0
    def test_get_cname_with_https_custom_port(self):
        httpretty.register_uri(httpretty.GET,
                               'https://tsuruhost.com:8443/apps/xpto',
                               body='{"cname":["cname1", "cname2"]}')

        self.bg = BlueGreen('token', 'https://tsuruhost.com:8443', self.config)
        self.assertEqual(self.bg.get_cname('xpto'), self.cnames)
Ejemplo n.º 2
0
    def setUp(self):
        self.config = {
            'name': 'test-app',
            'deploy_dir': '.',
            'retry_times': 3,
            'retry_sleep': 0,
            'hooks': {
                'before_pre': 'echo test',
                'after_swap': 'undefined_command'
            },
            'newrelic': {
                'api_key': 'some-api-key',
                'app_id': '123'
            },
            'grafana': {
                'endpoint': 'http://tcp.logstash.example.com',
                'index': 'test-index'
            },
            'webhook': {
                'endpoint': 'http://example.com',
                'payload_extras': 'key1=value1&key2=value2'
            }
        }

        self.bg = BlueGreen('token', 'tsuruhost.com', self.config)
        self.cnames = [u'cname1', u'cname2']
Ejemplo n.º 3
0
    def setUp(self):
        config = {
            'name': 'test-app',
            'hooks': {
                'before_pre': 'echo test',
                'after_swap': 'undefined_command'
            },
            'newrelic': {
                'api_key': 'some-api-key',
                'app_id': '123'
            },
            'webhook': {
                'endpoint': 'http://example.com',
                'payload_extras': 'key1=value1&key2=value2'
            }
        }

        self.bg = BlueGreen('token', 'tsuru.globoi.com', config)
        self.cnames = [u'cname1', u'cname2']