Esempio n. 1
0
def setup_package():
    try:
        infra.start_infra(async=True)
    except Exception as e:
        # make sure to tear down the infrastructure
        infra.stop_infra()
        raise e
Esempio n. 2
0
def setup_package():
    try:
        os.environ[ENV_INTERNAL_TEST_RUN] = '1'
        infra.start_infra(async=True)
    except Exception as e:
        # make sure to tear down the infrastructure
        infra.stop_infra()
        raise e
Esempio n. 3
0
def setup_package():
    try:
        os.environ[ENV_INTERNAL_TEST_RUN] = '1'
        # disable SSL verification for local tests
        safe_requests.verify_ssl = False
        # start infrastructure services
        infra.start_infra(async=True)
    except Exception as e:
        # make sure to tear down the infrastructure
        infra.stop_infra()
        raise e
Esempio n. 4
0
def localstack():
    from localstack.services import infra
    infra.start_infra(
        asynchronous=True,
        apis=[
            'ses', 'lambda', 'sqs', 'dynamodb',
            'cloudwatch',  # required for lambda to work
        ],
    )
    yield
    infra.stop_infra()
Esempio n. 5
0
def setup_package():
    try:
        os.environ[ENV_INTERNAL_TEST_RUN] = '1'
        # disable SSL verification for local tests
        safe_requests.verify_ssl = False
        # start infrastructure services
        infra.start_infra(async=True)
    except Exception as e:
        # make sure to tear down the infrastructure
        infra.stop_infra()
        raise e
Esempio n. 6
0
def setup_package():
    try:
        os.environ[ENV_INTERNAL_TEST_RUN] = '1'
        # disable SSL verification for local tests
        safe_requests.verify_ssl = False
        # start profiling
        FuncThread(start_profiling).start()
        # start infrastructure services
        infra.start_infra(asynchronous=True)
        # initializing terraform
        TestTerraform.init_async()
    except Exception as e:
        # make sure to tear down the infrastructure
        infra.stop_infra()
        raise e
Esempio n. 7
0
def setup_package():
    try:
        os.environ[ENV_INTERNAL_TEST_RUN] = '1'
        # disable SSL verification for local tests
        safe_requests.verify_ssl = False
        # start profiling
        FuncThread(start_profiling).start()
        # start infrastructure services
        infra.start_infra(asynchronous=True)
        # initialize certain tests asynchronously to reduce overall test time
        if not os.environ.get('TEST_PATH') or 'terraform' in os.environ.get(
                'TEST_PATH'):
            TestTerraform.init_async()
    except Exception as e:
        # make sure to tear down the infrastructure
        infra.stop_infra()
        raise e
Esempio n. 8
0
def teardown_package():
    print('Shutdown')
    mutex.release()
    cleanup(files=True)
    infra.stop_infra()
Esempio n. 9
0
def teardown_package():
    print("Shutdown")
    cleanup(files=True)
    infra.stop_infra()
Esempio n. 10
0
 def tearDownClass(cls):
     infra.stop_infra()
Esempio n. 11
0
 def watchdog():
     logger.info("waiting stop event")
     localstack_stop.wait()  # triggered by _trigger_stop()
     logger.info("stopping infra")
     infra.stop_infra()
Esempio n. 12
0
 def teardown_class(cls):
     infra.stop_infra()
     infra.check_infra(retries=2, expect_shutdown=True, apis=["s3"])
 def teardown_class(self):
     infra.stop_infra()
Esempio n. 14
0
 def tearDown(self):
     terraform_helper.destroy_resources()
     # Stop localstack
     infra.stop_infra()
Esempio n. 15
0
 def teardown_class(cls):
     infra.stop_infra()
Esempio n. 16
0
def teardown_package():
    print('Shutdown')
    cleanup(files=True)
    infra.stop_infra()