def main(): url = os.getenv("TARGET_URL") tg = TrafficGenerator(url) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) loop.run_until_complete( tg.run() )
def main(): Main.set_logging_level("INFO") url = os.getenv("BASE_URL", "https://glasswallsolutions.com") test_id = os.getenv("TEST_ID", "1001") ocp = OpenCensusPrometheus(test_id) while True: asyncio.get_event_loop().run_until_complete( TrafficGenerator.run(url, ocp))
def setUpClass(cls): gov_uk_url = os.getenv("GOV_UK_URL", "https://www.gov.uk.glasswall-icap.com") file_drop_url = os.getenv( "FILE_DROP_URL", "https://glasswall-file-drop.azurewebsites.net") num_files = int(os.getenv("NUM_FILES", 10)) tg = TrafficGenerator(gov_uk_url) asyncio.get_event_loop().run_until_complete( tg.run(num_files=num_files)) cls.file_drop = FileDrop(file_drop_url)
def setUpClass(cls): gov_uk_url = os.getenv("GOV_UK_URL", "https://www.gov.uk.glasswall-icap.com") file_drop_url = os.getenv("FILE_DROP_URL", "https://glasswall-file-drop.azurewebsites.net") num_files = int(os.getenv("NUM_FILES", 1)) elastic_host = os.getenv("ELASTIC_HOST", "localhost") elastic_port = os.getenv("ELASTIC_PORT", "9200") elastic_username = os.getenv("ELASTIC_USER") elastic_password = os.getenv("ELASTIC_PASSWORD") cls.index_name = os.getenv("INDEX_NAME", "tg_test_results") tg = TrafficGenerator(gov_uk_url) asyncio.get_event_loop().run_until_complete(tg.run(num_files=num_files)) cls.file_drop = FileDrop(file_drop_url) cls.ship_test_results_to_elastic = os.getenv("SHIP_TO_ELASTIC", "0") if cls.ship_test_results_to_elastic == "1": cls.es = ElasticService(elastic_host, elastic_port, elastic_username, elastic_password) cls.es.create_index(cls.index_name)
def run(): Main.set_logging_level("INFO") asyncio.get_event_loop().run_until_complete( TrafficGenerator.run(url=os.getenv("URL"), action=os.getenv("ACTION")) )
def run(): args = Main.get_command_line_args() Main.set_logging_level("INFO") asyncio.get_event_loop().run_until_complete( TrafficGenerator.run(url=args.url, action=args.action))