mirror of
https://github.com/laramies/theHarvester.git
synced 2024-09-20 15:26:31 +08:00
Found an even better way of checking if running on GH actions and to skip with pytest and tidyer as well
This commit is contained in:
parent
f43854ef0f
commit
59ac74e629
|
@ -7,12 +7,7 @@
|
|||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def is_github_action():
|
||||
if os.getenv('GITHUB_ACTIONS') is True:
|
||||
return 'github'
|
||||
github_ci = os.getenv('GITHUB_ACTIONS')
|
||||
|
||||
|
||||
class TestAnubis:
|
||||
|
|
|
@ -7,12 +7,7 @@
|
|||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def is_github_action():
|
||||
if os.getenv('GITHUB_ACTIONS') is True:
|
||||
return 'github'
|
||||
github_ci = os.getenv('GITHUB_ACTIONS')
|
||||
|
||||
|
||||
class TestBufferover(object):
|
||||
|
|
|
@ -7,12 +7,7 @@
|
|||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def is_github_action():
|
||||
if os.getenv('GITHUB_ACTIONS') is True:
|
||||
return 'github'
|
||||
github_ci = os.getenv('GITHUB_ACTIONS')
|
||||
|
||||
|
||||
class TestCertspotter(object):
|
||||
|
|
|
@ -7,12 +7,7 @@
|
|||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def is_github_action():
|
||||
if os.getenv('GITHUB_ACTIONS') is True:
|
||||
return 'github'
|
||||
github_ci = os.getenv('GITHUB_ACTIONS')
|
||||
|
||||
|
||||
class TestGetLinks(object):
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
#!/usr/bin/env python3
|
||||
# coding=utf-8
|
||||
import os
|
||||
|
||||
from theHarvester.lib.core import *
|
||||
from theHarvester.discovery import omnisint
|
||||
import os
|
||||
import requests
|
||||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def is_github_action():
|
||||
if os.getenv('GITHUB_ACTIONS') is True:
|
||||
return 'github'
|
||||
github_ci = os.getenv('GITHUB_ACTIONS')
|
||||
|
||||
|
||||
class TestOmnisint(object):
|
||||
|
@ -20,7 +16,7 @@ class TestOmnisint(object):
|
|||
def domain() -> str:
|
||||
return 'uber.com'
|
||||
|
||||
@pytest.mark.skipif(is_github_action == 'github', reason='Skipped test as fails on CI often but not locally')
|
||||
@pytest.mark.skipif(github_ci == 'True', reason='Skipping on Github CI due unstable status code from site')
|
||||
async def test_api(self):
|
||||
base_url = f'https://sonar.omnisint.io/all/{TestOmnisint.domain()}'
|
||||
headers = {'User-Agent': Core.get_user_agent()}
|
||||
|
|
|
@ -7,12 +7,7 @@
|
|||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def is_github_action():
|
||||
if os.getenv('GITHUB_ACTIONS') is True:
|
||||
return 'github'
|
||||
github_ci = os.getenv('GITHUB_ACTIONS')
|
||||
|
||||
|
||||
class TestOtx(object):
|
||||
|
|
|
@ -5,12 +5,7 @@
|
|||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def is_github_action():
|
||||
if os.getenv('GITHUB_ACTIONS') is True:
|
||||
return 'github'
|
||||
github_ci = os.getenv('GITHUB_ACTIONS')
|
||||
|
||||
|
||||
class TestSearchQwant(object):
|
||||
|
|
|
@ -7,12 +7,7 @@
|
|||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def is_github_action():
|
||||
if os.getenv('GITHUB_ACTIONS') is True:
|
||||
return 'github'
|
||||
github_ci = os.getenv('GITHUB_ACTIONS')
|
||||
|
||||
|
||||
class TestSublist3r(object):
|
||||
|
|
|
@ -7,12 +7,7 @@
|
|||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def is_github_action():
|
||||
if os.getenv('GITHUB_ACTIONS') is True:
|
||||
return 'github'
|
||||
github_ci = os.getenv('GITHUB_ACTIONS')
|
||||
|
||||
|
||||
class TestThreatminer(object):
|
||||
|
|
Loading…
Reference in a new issue