예제 #1
0
 def test_with_file_missing(self, mock_get_settings_failed):
     with pytest.raises(Exception):
         readers.find_tail_host(host=self.TEST_HOST)
예제 #2
0
    def test_with_host_key_missing(self, mock_get_settings):
        OTHER_TEST_HOST = 'fake-host-2'
        tail_host = readers.find_tail_host(host=OTHER_TEST_HOST)

        assert tail_host == OTHER_TEST_HOST
예제 #3
0
def test_find_tail_host_devb(mock_ecosystem, mock_settings):
    mock_ecosystem.return_value = 'eco1'
    mock_settings.side_effect = get_settings_side_effect
    assert readers.find_tail_host() == readers.find_tail_host('scribe.local.yelpcorp.com') == 'tail-host2.dev.yelpcorp.com'
예제 #4
0
    def test(self, mock_get_settings):
        tail_host = readers.find_tail_host(host=self.TEST_HOST)

        assert tail_host == self.TEST_TAIL_HOST
예제 #5
0
def test_find_tail_host_prod(mock_region, mock_ecosystem, mock_settings):
    mock_ecosystem.return_value = 'prod'
    mock_region.return_value = 'region1'
    mock_settings.side_effect = get_settings_side_effect
    assert readers.find_tail_host() == readers.find_tail_host('scribe.local.yelpcorp.com') == 'tail-host1.prod.yelpcorp.com'
예제 #6
0
def test_find_tail_host():
    assert readers.find_tail_host('fakehost') == 'fakehost'
예제 #7
0
def test_find_tail_host():
    assert readers.find_tail_host('fakehost') == 'fakehost'
예제 #8
0
def test_find_tail_host_devb(mock_ecosystem, mock_settings):
    mock_ecosystem.return_value = 'eco1'
    mock_settings.side_effect = get_settings_side_effect
    assert readers.find_tail_host() == readers.find_tail_host(
        'scribe.local.yelpcorp.com') == 'tail-host2.dev.yelpcorp.com'
예제 #9
0
def test_find_tail_host_prod(mock_region, mock_ecosystem, mock_settings):
    mock_ecosystem.return_value = 'prod'
    mock_region.return_value = 'region1'
    mock_settings.side_effect = get_settings_side_effect
    assert readers.find_tail_host() == readers.find_tail_host(
        'scribe.local.yelpcorp.com') == 'tail-host1.prod.yelpcorp.com'