Exemple #1
0
async def scenario_symbolication(session):
    with open(get_var('stacks').pop()) as f:
        stack = json.load(f)
    url = get_var('url_server') + '/symbolicate/v4'
    async with session.post(url, json=stack) as resp:
        assert resp.status == 200
        res = await resp.json()
        assert 'knownModules' in res
        assert 'symbolicatedStacks' in res
Exemple #2
0
async def scenario_symbolication(session):
    headers = {"Content-Type": "application/json"}

    with open(get_var("stacks").pop()) as f:
        url = get_var("url_server") + "/symbolicate/v5"
        async with session.post(url, data=f, headers=headers) as resp:
            assert resp.status == 200
            data = await resp.json()
            assert "knownModules" in data
            assert "symbolicatedStacks" in data
Exemple #3
0
async def scenario_symbolication(session):
    headers = {'Content-Type': 'application/json'}

    with open(get_var('stacks').pop()) as f:
        url = get_var('url_server') + '/symbolicate/v4'
        async with session.post(url, data=f, headers=headers) as resp:
            assert resp.status == 200
            data = await resp.json()
            assert 'knownModules' in data
            assert 'symbolicatedStacks' in data
Exemple #4
0
    def test_get_var_factory(self):
        me = object()

        def factory():
            return me

        self.assertTrue(get_var('me', factory) is me)
Exemple #5
0
async def scenario_download(session):
    job = get_var('symbols').pop()
    url = get_var('url_server') + '/{}'.format(job[0])
    async with session.get(url, allow_redirects=False) as resp:
        # If we get a 302, that means that the symbol server did find
        # the symbol and it's redirecting us to its true source. In
        # other words, it exists in S3.
        # When the fixtures were created, it was recorded as `job[1]` here.
        # However, symbols might have changed since the fixtures were
        # created so we can't fully bank on the results matching.
        # So we'll just be happy to note that it worked.
        assert resp.status in (302, 404), resp.status
        if resp.status == 404:
            # If it was a 404, make sure the 404 message came from Tecken
            text = await resp.text()
            assert 'Symbol Not Found' in text, text
        elif resp.status == 302:
            # If it was a redirect, make sure the location header
            # stil has the job uri in it.
            assert job[0] in resp.headers['location']
Exemple #6
0
 def test_setget_var(self):
     me = object()
     set_var('me', me)
     self.assertTrue(get_var('me') is me)
Exemple #7
0
 def test_setget_var(self):
     me = object()
     set_var("me", me)
     self.assertTrue(get_var("me") is me)
Exemple #8
0
 async def _teardown_session(wid, session):
     self.assertEqual(get_var("some"), 1)
     res.append("SESSION_TEARDOWN")