diff --git a/.builder/actions/aws_crt_python.py b/.builder/actions/aws_crt_python.py index e5ea26584..6ef904dda 100644 --- a/.builder/actions/aws_crt_python.py +++ b/.builder/actions/aws_crt_python.py @@ -3,6 +3,7 @@ import os import sys + class InstallPythonReqs(Builder.Action): def __init__(self, trust_hosts=False, deps=[], python=sys.executable): self.trust_hosts = trust_hosts @@ -26,10 +27,16 @@ def run(self, env): class AWSCrtPython(Builder.Action): - def run(self, env): - # Once the virtualenv is set up, we must use that python, so that the venv is used - python = sys.executable + def __init__(self, custom_python=None, name=None): + """ + Prefer the current python3 executable (so that venv is used). + But allow a custom python to be used for installing and testing awscrt on. + """ + self.python3 = sys.executable + self.custom_python = custom_python if custom_python else self.python3 + self.name = name if name else 'aws-crt-python' + def run(self, env): install_options = [] if 'linux' == Builder.Host.current_platform(): install_options = [ @@ -37,10 +44,13 @@ def run(self, env): '--install-option=--library-dirs={openssl_lib}'] actions = [ - InstallPythonReqs(deps=['boto3']), - [python, '-m', 'pip', 'install', '.', '--install-option=--verbose', '--install-option=build_ext', *install_options], - [python, '-m', 'unittest', 'discover', '--verbose'], - [python, 'aws-common-runtime/aws-c-http/integration-testing/http_client_test.py', python, 'elasticurl.py'], + InstallPythonReqs(deps=['boto3'], python=self.custom_python), + [self.custom_python, '-m', 'pip', 'install', '.', '--install-option=--verbose', + '--install-option=build_ext', *install_options], + [self.custom_python, '-m', 'unittest', 'discover', '--verbose'], + # http_client_test.py is python3-only. It launches external processes using the extra args + [self.python3, 'aws-common-runtime/aws-c-http/integration-testing/http_client_test.py', + self.custom_python, 'elasticurl.py'], ] - return Builder.Script(actions, name='aws-crt-python') + return Builder.Script(actions, name=self.name) diff --git a/.builder/actions/manylinux-ci.py b/.builder/actions/manylinux-ci.py index 5c5328f9a..19839b396 100644 --- a/.builder/actions/manylinux-ci.py +++ b/.builder/actions/manylinux-ci.py @@ -2,7 +2,7 @@ import Builder import os import sys -from aws_crt_python import InstallPythonReqs +from aws_crt_python import AWSCrtPython, InstallPythonReqs pythons = ( 'cp35-cp35m', @@ -17,10 +17,6 @@ def python_path(version): return '/opt/python/{}/bin/python'.format(version) -def default_python(): - return sys.executable - - class ManyLinuxPackage(Builder.Action): def run(self, env): steps = [] @@ -38,7 +34,7 @@ def run(self, env): actions = [ InstallPythonReqs(python=python), - [python,'-m', 'pip', 'install', '.', + [python, '-m', 'pip', 'install', '.', '--install-option=--verbose', '--install-option=sdist', '--install-option=bdist_wheel', @@ -60,8 +56,6 @@ def run(self, env): class ManyLinuxCI(Builder.Action): def run(self, env): - python3 = default_python() - steps = [] for version in pythons: python = python_path(version) @@ -69,18 +63,7 @@ def run(self, env): print('Skipping {} as it is not installed'.format(python)) continue - install_options = [] - if 'linux' == Builder.Host.current_platform(): - install_options = [ - '--install-option=--include-dirs={openssl_include}', - '--install-option=--library-dirs={openssl_lib}'] - - actions = [ - InstallPythonReqs(python=python, deps=['boto3'], trust_hosts=True), - [python, '-m', 'pip', 'install', '.', - '--install-option=--verbose', '--install-option=build_ext', *install_options], - [python3, 'aws-common-runtime/aws-c-http/integration-testing/http_client_test.py', python, 'elasticurl.py'], - ] - steps.append(Builder.Script(actions, name=python)) + # Run the usual AWSCrtPython build and test steps for this python + steps.append(AWSCrtPython(custom_python=python, name=python)) return Builder.Script(steps, name='manylinux-ci') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22f6795a9..425cfadc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,9 @@ env: PACKAGE_NAME: aws-crt-python LINUX_BASE_IMAGE: ubuntu-16-x64 RUN: ${{ github.run_id }}-${{ github.run_number }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} jobs: linux-compat: @@ -30,7 +33,7 @@ jobs: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ matrix.image }}:${{ env.BUILDER_VERSION }} docker pull $DOCKER_IMAGE - docker run --env GITHUB_REF $DOCKER_IMAGE -p ${{ env.PACKAGE_NAME }} run manylinux-ci + docker run --env GITHUB_REF --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION $DOCKER_IMAGE -p ${{ env.PACKAGE_NAME }} run manylinux-ci al2: runs-on: ubuntu-latest @@ -41,8 +44,8 @@ jobs: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-al2-x64:${{ env.BUILDER_VERSION }} docker pull $DOCKER_IMAGE - docker run --env GITHUB_REF $DOCKER_IMAGE -p ${{ env.PACKAGE_NAME }} run aws-crt-python - + docker run --env GITHUB_REF --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION $DOCKER_IMAGE -p ${{ env.PACKAGE_NAME }} run aws-crt-python + clang-compat: runs-on: ubuntu-latest strategy: @@ -55,7 +58,7 @@ jobs: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ env.LINUX_BASE_IMAGE }}:${{ env.BUILDER_VERSION }} docker pull $DOCKER_IMAGE - docker run --env GITHUB_REF $DOCKER_IMAGE -p ${{ env.PACKAGE_NAME }} run aws-crt-python --compiler=clang-${{ matrix.version }} + docker run --env GITHUB_REF --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION $DOCKER_IMAGE -p ${{ env.PACKAGE_NAME }} run aws-crt-python --compiler=clang-${{ matrix.version }} gcc-compat: runs-on: ubuntu-latest @@ -69,7 +72,7 @@ jobs: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ env.LINUX_BASE_IMAGE }}:${{ env.BUILDER_VERSION }} docker pull $DOCKER_IMAGE - docker run --env GITHUB_REF $DOCKER_IMAGE -p ${{ env.PACKAGE_NAME }} run aws-crt-python --compiler=gcc-${{ matrix.version }} + docker run --env GITHUB_REF --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION $DOCKER_IMAGE -p ${{ env.PACKAGE_NAME }} run aws-crt-python --compiler=gcc-${{ matrix.version }} windows: runs-on: windows-latest diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml deleted file mode 100644 index c784771e6..000000000 --- a/.github/workflows/clang-format.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Lint - -on: [push] - -jobs: - clang-format: - - runs-on: ubuntu-latest - - steps: - - name: Checkout Sources - uses: actions/checkout@v1 - - - name: clang-format lint - uses: DoozyX/clang-format-lint-action@v0.3.1 - with: - # List of extensions to check - extensions: c,h diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..ac6649145 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +name: Lint + +on: [push] + +jobs: + clang-format: + + runs-on: ubuntu-latest + + steps: + - name: Checkout Sources + uses: actions/checkout@v2 + + - name: clang-format lint + uses: DoozyX/clang-format-lint-action@v0.3.1 + with: + # List of extensions to check + extensions: c,h + + autopep8: + runs-on: ubuntu-latest + + steps: + - name: Checkout Source + uses: actions/checkout@v2 + + - name: Build and Test + run: | + python3 -m pip install --upgrade setuptools + python3 -m pip install --upgrade autopep8 + python3 -m autopep8 --exit-code --diff --recursive awscrt test .builder setup.py \ No newline at end of file diff --git a/README.md b/README.md index 6772924d6..4fd981823 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,24 @@ -## AWS Crt Python +## AWS CRT Python Python bindings for the AWS Common Runtime ## License -This library is licensed under the Apache 2.0 License. +This library is licensed under the Apache 2.0 License. -## Building the Wheel +## Installation -This builds the wheel itself +To install from pip: ````bash - setup.py sdist bdist_wheel +python -m pip install awscrt ```` -You'll want to do this for every version of Python: -2.7m, 2.7mu, 3.4m, 3.5m, 3.6m, and 3.7m - -Don't worry, it will only do a full build on the first run. All the others will just reuse the artifacts. - -### Intel Linux -On linux, assuming you built on an ancient distro (GLIBC is <= 2.5), you'll need to have python inspect the artifact -and ensure it's compatible: - -````bash -auditwheel show dist/ -```` - -If everything is good to go, you'll see a line that says: - -following platform tag: "manylinux1_\". - -One thing to keep in mind, you'll need a version of libcrypto build as a static lib with position independent code (-fPIC). -DO NOT use the shared lib version of libcrypto or the wheel will not pass this test. - -Now you'll need to have the wheel renamed to something compatible with pypi: - +To install from Github: ````bash -auditwheel repair --plat manylinux1_x86_64 -w dist dist/ +git clone https://github.com/awslabs/aws-crt-python.git +cd aws-crt-python +git submodule update --init +python -m pip install . ```` -After doing this, I like to delete all of the old wheel images for making the next step easier: - -### ARM Linux -The process is similar to Intel, but we haven't built the wheels yet. We'll update this document when we finally get that finished. - -## Publishing -Upload to pypi: - -````bash - -m twine upload --repository-url dist/* -```` - -## Using From Your Python Application - -Normally, you just declare `aws_crt` as a dependency in your setup.py file. - -### Installing from pip -````bash -pip install aws_crt -```` +To use from your Python application, declare `awscrt` as a dependency in your `setup.py` file. diff --git a/aws-common-runtime/aws-c-auth b/aws-common-runtime/aws-c-auth index 8281ad698..85dd9e394 160000 --- a/aws-common-runtime/aws-c-auth +++ b/aws-common-runtime/aws-c-auth @@ -1 +1 @@ -Subproject commit 8281ad6989d815bb59fa5612a43193ec3795ff7b +Subproject commit 85dd9e39474a2b9e04f41e9feabb589a4bec20ca diff --git a/aws-common-runtime/aws-c-cal b/aws-common-runtime/aws-c-cal index 8e9caac28..b30e81b34 160000 --- a/aws-common-runtime/aws-c-cal +++ b/aws-common-runtime/aws-c-cal @@ -1 +1 @@ -Subproject commit 8e9caac28ffb43e7c5536017378661d66c93d279 +Subproject commit b30e81b343609484fe2d6892698ecd4419777f7f diff --git a/aws-common-runtime/aws-c-common b/aws-common-runtime/aws-c-common index 045024d73..4a6ae22c7 160000 --- a/aws-common-runtime/aws-c-common +++ b/aws-common-runtime/aws-c-common @@ -1 +1 @@ -Subproject commit 045024d735c64a1e488827e4b70b20b3295be4ef +Subproject commit 4a6ae22c728bb69fbd462159542bf5013f965575 diff --git a/aws-common-runtime/aws-c-compression b/aws-common-runtime/aws-c-compression index 45d6ba1f1..c7e477bf6 160000 --- a/aws-common-runtime/aws-c-compression +++ b/aws-common-runtime/aws-c-compression @@ -1 +1 @@ -Subproject commit 45d6ba1f1edf323728dbcfaa60afc91e004d4d3f +Subproject commit c7e477bf6ab7df17cdad223300541fe3aa978f35 diff --git a/aws-common-runtime/aws-c-http b/aws-common-runtime/aws-c-http index 232f3358a..e5386127c 160000 --- a/aws-common-runtime/aws-c-http +++ b/aws-common-runtime/aws-c-http @@ -1 +1 @@ -Subproject commit 232f3358a7eab67f18c18332a6510838f749eca3 +Subproject commit e5386127cd43b5aea476500b9a38d7e9b72b82f7 diff --git a/aws-common-runtime/aws-c-io b/aws-common-runtime/aws-c-io index 250484cc0..44eabdfc0 160000 --- a/aws-common-runtime/aws-c-io +++ b/aws-common-runtime/aws-c-io @@ -1 +1 @@ -Subproject commit 250484cc0e985cc9bc8ffb0591c5d74c6541f113 +Subproject commit 44eabdfc0f0586e221e1a5eb37253ec1e90ebd1c diff --git a/aws-common-runtime/aws-c-mqtt b/aws-common-runtime/aws-c-mqtt index 9895e4d16..5ed5ee07e 160000 --- a/aws-common-runtime/aws-c-mqtt +++ b/aws-common-runtime/aws-c-mqtt @@ -1 +1 @@ -Subproject commit 9895e4d16c8e68dcf3ab40fed9f2ca0c2a52e24e +Subproject commit 5ed5ee07e3be9515a30a6ff47a43ab7b9144ef3a diff --git a/awscrt/awsiot_mqtt_connection_builder.py b/awscrt/awsiot_mqtt_connection_builder.py index b361ef07c..dd427673b 100644 --- a/awscrt/awsiot_mqtt_connection_builder.py +++ b/awscrt/awsiot_mqtt_connection_builder.py @@ -40,11 +40,11 @@ keep_alive_secs (int): The keep alive value, in seconds, to send in CONNECT packet. A PING will automatically be sent at this interval. The server will assume the connection is lost if no PING is received after 1.5X this value. - Default is 3600 (1 hour). This value must be higher than ping_timeout_ms. + Default is 1200sec (20 minutes). This duration must be longer than ping_timeout_ms. ping_timeout_ms (int): Milliseconds to wait for ping response before client assumes the connection is invalid and attempts to reconnect. - Default is 3000ms (3 seconds). This value must be less than keep_alive. + Default is 3000ms (3 seconds). This duration must be shorter than keep_alive_secs. Alternatively, TCP keep-alive may accomplish this in a more efficient (low-power) scenario, but keep-alive options may not work the same way on every platform and OS version. @@ -182,7 +182,7 @@ def _builder( clean_session=kwargs.get('clean_session', False), reconnect_min_timeout_secs=kwargs.get('reconnect_min_timeout_secs', 5), reconnect_max_timeout_secs=kwargs.get('reconnect_max_timeout_secs', 60), - keep_alive_secs=kwargs.get('keep_alive_secs', 3600), + keep_alive_secs=kwargs.get('keep_alive_secs', 1200), ping_timeout_ms=kwargs.get('ping_timeout_ms', 3000), will=kwargs.get('will'), username=username, diff --git a/awscrt/mqtt.py b/awscrt/mqtt.py index 3c1564bac..afb9971a9 100644 --- a/awscrt/mqtt.py +++ b/awscrt/mqtt.py @@ -77,7 +77,7 @@ def __init__(self, on_connection_resumed=None, reconnect_min_timeout_secs=5, reconnect_max_timeout_secs=60, - keep_alive_secs=3600, + keep_alive_secs=1200, ping_timeout_ms=3000, will=None, username=None, @@ -132,11 +132,11 @@ def __init__(self, keep_alive_secs (int): The keep alive value, in seconds, to send in CONNECT packet. A PING will automatically be sent at this interval. The server will assume the connection is lost if no PING is received after 1.5X this value. - This value must be higher than ping_timeout_ms. + This duration must be longer than ping_timeout_ms. ping_timeout_ms (int): Milliseconds to wait for ping response before client assumes the connection is invalid and attempts to reconnect. - This value must be less than keep_alive. + This duration must be shorter than keep_alive_secs. Alternatively, TCP keep-alive may accomplish this in a more efficient (low-power) scenario, but keep-alive options may not work the same way on every platform and OS version. @@ -173,6 +173,9 @@ def __init__(self, assert isinstance(websocket_proxy_options, HttpProxyOptions) or websocket_proxy_options is None assert callable(websocket_handshake_transform) or websocket_handshake_transform is None + if keep_alive_secs * 1000 <= ping_timeout_ms: + raise ValueError("'keep_alive_secs' duration must be longer than 'ping_timeout_ms'") + super(Connection, self).__init__() # init-only diff --git a/setup.py b/setup.py index 4376f24c4..c7bdd6a32 100644 --- a/setup.py +++ b/setup.py @@ -83,6 +83,19 @@ def determine_generator_args(): return [] +cmake_found = False + + +def check_cmake_installed(): + global cmake_found + if not cmake_found: + try: + subprocess.check_call(['cmake', '--version']) + cmake_found = True + except Exception: + raise Exception("'cmake' not found. cmake must be installed to build from source.") + + class AwsLib(object): def __init__(self, name, extra_cmake_args=[]): self.name = name @@ -110,6 +123,8 @@ def __init__(self, name, extra_cmake_args=[]): class awscrt_build_ext(setuptools.command.build_ext.build_ext): def _build_dependency(self, aws_lib): + check_cmake_installed() + prev_cwd = os.getcwd() # restore cwd at end of function lib_source_dir = os.path.join(PROJECT_DIR, 'aws-common-runtime', aws_lib.name) @@ -229,7 +244,7 @@ def awscrt_ext(): setuptools.setup( name="awscrt", - version="0.5.6", + version="0.5.7", author="Amazon Web Services, Inc", author_email="aws-sdk-common-runtime@amazon.com", description="A common runtime for AWS Python projects", diff --git a/test/resources/credentials_test b/test/resources/credentials_test deleted file mode 100644 index f5745e2f8..000000000 --- a/test/resources/credentials_test +++ /dev/null @@ -1,3 +0,0 @@ -[default] -aws_access_key_id = credentials_test_access_key_id -aws_secret_access_key = credentials_test_secret_access_key diff --git a/test/test_auth.py b/test/test_auth.py index 048e6164d..e4f09a66f 100644 --- a/test/test_auth.py +++ b/test/test_auth.py @@ -30,10 +30,13 @@ class ScopedEnvironmentVariable(object): def __init__(self, key, value): self.key = key + self.value = value self.prev_value = os.environ.get(key) - os.environ[key] = value - def __del__(self): + def __enter__(self): + os.environ[self.key] = self.value + + def __exit__(self, type, value, tb): if self.prev_value is None: del os.environ[self.key] else: @@ -46,15 +49,19 @@ def test_create(self): EXAMPLE_ACCESS_KEY_ID, EXAMPLE_SECRET_ACCESS_KEY, EXAMPLE_SESSION_TOKEN) - self.assertEqual(EXAMPLE_ACCESS_KEY_ID, credentials.access_key_id) - self.assertEqual(EXAMPLE_SECRET_ACCESS_KEY, credentials.secret_access_key) - self.assertEqual(EXAMPLE_SESSION_TOKEN, credentials.session_token) + + # Don't use assertEqual(), which could log actual credentials if test fails. + self.assertTrue(EXAMPLE_ACCESS_KEY_ID == credentials.access_key_id) + self.assertTrue(EXAMPLE_SECRET_ACCESS_KEY == credentials.secret_access_key) + self.assertTrue(EXAMPLE_SESSION_TOKEN == credentials.session_token) def test_create_no_session_token(self): credentials = awscrt.auth.AwsCredentials(EXAMPLE_ACCESS_KEY_ID, EXAMPLE_SECRET_ACCESS_KEY) - self.assertEqual(EXAMPLE_ACCESS_KEY_ID, credentials.access_key_id) - self.assertEqual(EXAMPLE_SECRET_ACCESS_KEY, credentials.secret_access_key) - self.assertIsNone(credentials.session_token) + + # Don't use assertEqual(), which could log actual credentials if test fails. + self.assertTrue(EXAMPLE_ACCESS_KEY_ID == credentials.access_key_id) + self.assertTrue(EXAMPLE_SECRET_ACCESS_KEY == credentials.secret_access_key) + self.assertTrue(credentials.session_token is None) class TestProvider(NativeResourceTest): @@ -67,9 +74,10 @@ def test_static_provider(self): future = provider.get_credentials() credentials = future.result(TIMEOUT) - self.assertEqual(EXAMPLE_ACCESS_KEY_ID, credentials.access_key_id) - self.assertEqual(EXAMPLE_SECRET_ACCESS_KEY, credentials.secret_access_key) - self.assertEqual(EXAMPLE_SESSION_TOKEN, credentials.session_token) + # Don't use assertEqual(), which could log actual credentials if test fails. + self.assertTrue(EXAMPLE_ACCESS_KEY_ID == credentials.access_key_id) + self.assertTrue(EXAMPLE_SECRET_ACCESS_KEY == credentials.secret_access_key) + self.assertTrue(EXAMPLE_SESSION_TOKEN == credentials.session_token) # TODO: test currently broken because None session_token comes back as empty string do to inconsistent use of # aws_byte_cursor by value/pointer in aws-c-auth APIs. @@ -82,27 +90,28 @@ def test_static_provider(self): # future = provider.get_credentials() # credentials = future.result(TIMEOUT) - # self.assertEqual(self.example_access_key_id, credentials.access_key_id) - # self.assertEqual(self.example_secret_access_key, credentials.secret_access_key) - # self.assertIsNone(credentials.session_token) + # Don't use assertEqual(), which could log actual credentials if test fails. + # self.assertTrue(self.example_access_key_id == credentials.access_key_id) + # self.assertTrue(self.example_secret_access_key == credentials.secret_access_key) + # self.assertTrue(credentials.session_token is None) def test_default_provider(self): - # Use environment variable to force specific credentials file - scoped_env = ScopedEnvironmentVariable('AWS_SHARED_CREDENTIALS_FILE', 'test/resources/credentials_test') - - event_loop_group = awscrt.io.EventLoopGroup() - host_resolver = awscrt.io.DefaultHostResolver(event_loop_group) - bootstrap = awscrt.io.ClientBootstrap(event_loop_group, host_resolver) - provider = awscrt.auth.AwsCredentialsProvider.new_default_chain(bootstrap) - - future = provider.get_credentials() - credentials = future.result(TIMEOUT) - - self.assertEqual('credentials_test_access_key_id', credentials.access_key_id) - self.assertEqual('credentials_test_secret_access_key', credentials.secret_access_key) - self.assertIsNone(credentials.session_token) - - del scoped_env + # Default credentials provider should pick up environment variables. + with ScopedEnvironmentVariable('AWS_ACCESS_KEY_ID', EXAMPLE_ACCESS_KEY_ID), \ + ScopedEnvironmentVariable('AWS_SECRET_ACCESS_KEY', EXAMPLE_SECRET_ACCESS_KEY): + + event_loop_group = awscrt.io.EventLoopGroup() + host_resolver = awscrt.io.DefaultHostResolver(event_loop_group) + bootstrap = awscrt.io.ClientBootstrap(event_loop_group, host_resolver) + provider = awscrt.auth.AwsCredentialsProvider.new_default_chain(bootstrap) + + future = provider.get_credentials() + credentials = future.result(TIMEOUT) + + # Don't use assertEqual(), which could log actual credentials if test fails. + self.assertTrue(EXAMPLE_ACCESS_KEY_ID == credentials.access_key_id) + self.assertTrue(EXAMPLE_SECRET_ACCESS_KEY == credentials.secret_access_key) + self.assertTrue(credentials.session_token is None) class TestSigningConfig(NativeResourceTest): diff --git a/test/test_mqtt.py b/test/test_mqtt.py index 012321eac..7a6acdf3b 100644 --- a/test/test_mqtt.py +++ b/test/test_mqtt.py @@ -215,7 +215,6 @@ def test_mtls_from_path(self): self._test_connection(connection) - @unittest.skip("Build machines not set up to run this yet") def test_websockets_default(self): config = Config.get() elg = EventLoopGroup() @@ -230,7 +229,6 @@ def test_websockets_default(self): client_bootstrap=bootstrap) self._test_connection(connection) - @unittest.skip("Build machines not set up to run this yet") @unittest.skipIf(PROXY_HOST is None, 'requires "proxyhost" and "proxyport" env vars') def test_websockets_proxy(self): config = Config.get()