diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e84116..7524a14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,5 +28,4 @@ jobs: needs: [unit-tests] uses: ./.github/workflows/security-scan.yml secrets: - FOSSA_TOKEN: ${{ secrets.FOSSA_TOKEN }} SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} diff --git a/.github/workflows/code-check.yml b/.github/workflows/code-check.yml index a2f1e46..1f3401c 100644 --- a/.github/workflows/code-check.yml +++ b/.github/workflows/code-check.yml @@ -18,12 +18,12 @@ jobs: uses: actions/checkout@v2 with: ref: ${{ inputs.branch }} - + - name: Set up Python 3.8 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.8 - + - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/python-integration-tests-v0.yml b/.github/workflows/integration-tests-v1.yml similarity index 55% rename from .github/workflows/python-integration-tests-v0.yml rename to .github/workflows/integration-tests-v1.yml index a87c25d..d955d7b 100644 --- a/.github/workflows/python-integration-tests-v0.yml +++ b/.github/workflows/integration-tests-v1.yml @@ -1,16 +1,30 @@ -name: v0.x Integration tests +name: v1 Integration tests on: workflow_dispatch: + inputs: + environment: + description: 'Environment to run the tests against' + type: choice + required: true + default: 'dev' + options: + - dev + - staging workflow_call: + inputs: + environment: + default: 'staging' + required: false + type: string secrets: FIREBOLT_USERNAME: required: true FIREBOLT_PASSWORD: required: true - SERVICE_ID: + FIREBOLT_STG_USERNAME: required: true - SERVICE_SECRET: + FIREBOLT_STG_PASSWORD: required: true jobs: @@ -19,11 +33,9 @@ jobs: steps: - name: Check out code uses: actions/checkout@v2 - with: - ref: 0.x - name: Set up Python 3.7 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.7 @@ -32,13 +44,23 @@ jobs: python -m pip install --upgrade pip pip install ".[dev]" + - name: Determine env variables + run: | + if [ "${{ inputs.environment }}" == 'staging' ]; then + echo "USERNAME=${{ secrets.FIREBOLT_STG_USERNAME }}" >> "$GITHUB_ENV" + echo "PASSWORD=${{ secrets.FIREBOLT_STG_PASSWORD }}" >> "$GITHUB_ENV" + else + echo "USERNAME=${{ secrets.FIREBOLT_USERNAME }}" >> "$GITHUB_ENV" + echo "PASSWORD=${{ secrets.FIREBOLT_PASSWORD }}" >> "$GITHUB_ENV" + fi + - name: Setup database and engine id: setup uses: firebolt-db/integration-testing-setup@v1 with: - firebolt-username: ${{ secrets.FIREBOLT_USERNAME }} - firebolt-password: ${{ secrets.FIREBOLT_PASSWORD }} - api-endpoint: "api.dev.firebolt.io" + firebolt-username: ${{ env.USERNAME }} + firebolt-password: ${{ env.PASSWORD }} + api-endpoint: "api.${{ inputs.environment }}.firebolt.io" region: "us-east-1" - name: Restore cached failed tests @@ -47,23 +69,23 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - + key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }}-v1 + - name: Run integration tests env: - USER_NAME: ${{ secrets.FIREBOLT_USERNAME }} - PASSWORD: ${{ secrets.FIREBOLT_PASSWORD }} - SERVICE_ID: ${{ secrets.SERVICE_ID }} - SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }} + # the distinction is on the SDK side so just use CLIENT_* for username password + CLIENT_ID: ${{ env.USERNAME }} + CLIENT_SECRET: ${{ env.PASSWORD }} DATABASE_NAME: ${{ steps.setup.outputs.database_name }} ENGINE_NAME: ${{ steps.setup.outputs.engine_name }} ENGINE_URL: ${{ steps.setup.outputs.engine_url }} STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }} STOPPED_ENGINE_URL: ${{ steps.setup.outputs.stopped_engine_url }} - FIREBOLT_BASE_URL: "api.dev.firebolt.io" + FIREBOLT_BASE_URL: "api.${{ inputs.environment }}.firebolt.io" + ACCOUNT_NAME: "firebolt" run: | pytest --last-failed -o log_cli=true -o log_cli_level=INFO tests/integration - + - name: Save failed tests id: cache-tests-save uses: actions/cache/save@v3 diff --git a/.github/workflows/integration-tests-v2.yml b/.github/workflows/integration-tests-v2.yml new file mode 100644 index 0000000..d816e83 --- /dev/null +++ b/.github/workflows/integration-tests-v2.yml @@ -0,0 +1,93 @@ +name: v2 Integration tests + +on: + workflow_dispatch: + inputs: + environment: + description: 'Environment to run the tests against' + type: choice + required: true + default: 'dev' + options: + - dev + - staging + workflow_call: + inputs: + environment: + default: 'staging' + required: false + type: string + secrets: + FIREBOLT_CLIENT_ID_STG_NEW_IDN: + required: true + FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: + required: true + FIREBOLT_CLIENT_ID_NEW_IDN: + required: true + FIREBOLT_CLIENT_SECRET_NEW_IDN: + required: true + +jobs: + integration-tests: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Set up Python 3.7 + uses: actions/setup-python@v5 + with: + python-version: 3.7 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ".[dev]" + + - name: Determine env variables + run: | + if [ "${{ inputs.environment }}" == 'staging' ]; then + echo "CLIENT_ID=${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}" >> "$GITHUB_ENV" + echo "CLIENT_SECRET=${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}" >> "$GITHUB_ENV" + else + echo "CLIENT_ID=${{ secrets.FIREBOLT_CLIENT_ID_NEW_IDN }}" >> "$GITHUB_ENV" + echo "CLIENT_SECRET=${{ secrets.FIREBOLT_CLIENT_SECRET_NEW_IDN }}" >> "$GITHUB_ENV" + fi + + - name: Setup database and engine + id: setup + uses: firebolt-db/integration-testing-setup@v2 + with: + firebolt-client-id: ${{ env.CLIENT_ID }} + firebolt-client-secret: ${{ env.CLIENT_SECRET }} + account: "developer" + api-endpoint: "api.${{ inputs.environment }}.firebolt.io" + + - name: Restore cached failed tests + id: cache-tests-restore + uses: actions/cache/restore@v3 + with: + path: | + .pytest_cache/v/cache/lastfailed + key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }}-v2 + + - name: Run integration tests + env: + CLIENT_ID: ${{ env.CLIENT_ID }} + CLIENT_SECRET: ${{ env.CLIENT_SECRET }} + DATABASE_NAME: ${{ steps.setup.outputs.database_name }} + ENGINE_NAME: ${{ steps.setup.outputs.engine_name }} + STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }} + FIREBOLT_BASE_URL: "api.${{ inputs.environment }}.firebolt.io" + ACCOUNT_NAME: "developer" + run: | + pytest --last-failed -o log_cli=true -o log_cli_level=INFO tests/integration + + - name: Save failed tests + id: cache-tests-save + uses: actions/cache/save@v3 + if: failure() + with: + path: | + .pytest_cache/v/cache/lastfailed + key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} diff --git a/.github/workflows/nightly-v0.yml b/.github/workflows/nightly-v1.yml similarity index 80% rename from .github/workflows/nightly-v0.yml rename to .github/workflows/nightly-v1.yml index 99df3d6..3f525a8 100644 --- a/.github/workflows/nightly-v0.yml +++ b/.github/workflows/nightly-v1.yml @@ -1,4 +1,4 @@ -name: v0.x Nightly code check +name: v1 Nightly code check on: workflow_dispatch: schedule: @@ -6,39 +6,32 @@ on: jobs: code-check: uses: ./.github/workflows/code-check.yml - with: - branch: 0.x unit-tests: uses: ./.github/workflows/unit-tests.yml - with: - branch: 0.x secrets: GIST_PAT: ${{ secrets.GIST_PAT }} security-scan: needs: [unit-tests] uses: ./.github/workflows/security-scan.yml - with: - branch: 0.x secrets: - FOSSA_TOKEN: ${{ secrets.FOSSA_TOKEN }} SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} tests: runs-on: ${{ matrix.os }} strategy: fail-fast: false # finish all jobs even if one fails max-parallel: 2 - matrix: + matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] python-version: ['3.7', '3.8', '3.9', '3.10'] steps: - name: Check out code uses: actions/checkout@v2 - + - name: Set up Python 3.7 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -52,9 +45,9 @@ jobs: id: setup uses: firebolt-db/integration-testing-setup@v1 with: - firebolt-username: ${{ secrets.FIREBOLT_USERNAME }} - firebolt-password: ${{ secrets.FIREBOLT_PASSWORD }} - api-endpoint: "api.dev.firebolt.io" + firebolt-username: ${{ secrets.FIREBOLT_STG_USERNAME }} + firebolt-password: ${{ secrets.FIREBOLT_STG_PASSWORD }} + api-endpoint: "api.staging.firebolt.io" region: "us-east-1" db_suffix: ${{ format('{0}_{1}', matrix.os, matrix.python-version) }} @@ -64,21 +57,19 @@ jobs: with: path: | .pytest_cache/v/cache/lastfailed - key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} + key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }}-v1 - name: Run integration tests env: - USER_NAME: ${{ secrets.FIREBOLT_USERNAME }} - PASSWORD: ${{ secrets.FIREBOLT_PASSWORD }} - SERVICE_ID: ${{ secrets.SERVICE_ID }} - SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }} + CLIENT_ID: ${{ secrets.FIREBOLT_STG_USERNAME }} + CLIENT_SECRET: ${{ secrets.FIREBOLT_STG_PASSWORD }} DATABASE_NAME: ${{ steps.setup.outputs.database_name }} ENGINE_NAME: ${{ steps.setup.outputs.engine_name }} ENGINE_URL: ${{ steps.setup.outputs.engine_url }} STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }} STOPPED_ENGINE_URL: ${{ steps.setup.outputs.stopped_engine_url }} ACCOUNT_NAME: "firebolt" - FIREBOLT_BASE_URL: "api.dev.firebolt.io" + FIREBOLT_BASE_URL: "api.staging.firebolt.io" run: | pytest --last-failed -o log_cli=true -o log_cli_level=INFO --junit-xml=report/junit.xml tests/integration diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly-v2.yml similarity index 85% rename from .github/workflows/nightly.yml rename to .github/workflows/nightly-v2.yml index a45e751..38d63f7 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly-v2.yml @@ -1,4 +1,4 @@ -name: Nightly code check +name: v2 Nightly code check on: workflow_dispatch: schedule: @@ -14,25 +14,24 @@ jobs: needs: [unit-tests] uses: ./.github/workflows/security-scan.yml secrets: - FOSSA_TOKEN: ${{ secrets.FOSSA_TOKEN }} SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} tests: runs-on: ${{ matrix.os }} strategy: fail-fast: false # finish all jobs even if one fails max-parallel: 2 - matrix: + matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] python-version: ['3.7', '3.8', '3.9', '3.10'] steps: - name: Check out code uses: actions/checkout@v2 - + - name: Set up Python 3.7 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -46,10 +45,10 @@ jobs: id: setup uses: firebolt-db/integration-testing-setup@v2 with: - firebolt-client-id: ${{ secrets.FIREBOLT_CLIENT_ID_NEW_IDN }} - firebolt-client-secret: ${{ secrets.FIREBOLT_CLIENT_SECRET_NEW_IDN }} + firebolt-client-id: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }} + firebolt-client-secret: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }} account: "developer" - api-endpoint: "api.dev.firebolt.io" + api-endpoint: "api.staging.firebolt.io" db_suffix: ${{ format('{0}_{1}', matrix.os, matrix.python-version) }} - name: Restore cached failed tests @@ -62,12 +61,12 @@ jobs: - name: Run integration tests env: - SERVICE_ID: ${{ secrets.FIREBOLT_CLIENT_ID_NEW_IDN }} - SERVICE_SECRET: ${{ secrets.FIREBOLT_CLIENT_SECRET_NEW_IDN }} + SERVICE_ID: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }} + SERVICE_SECRET: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }} DATABASE_NAME: ${{ steps.setup.outputs.database_name }} ENGINE_NAME: ${{ steps.setup.outputs.engine_name }} STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }} - FIREBOLT_BASE_URL: "api.dev.firebolt.io" + FIREBOLT_BASE_URL: "api.staging.firebolt.io" ACCOUNT_NAME: "developer" run: | pytest --last-failed -o log_cli=true -o log_cli_level=INFO --junit-xml=report/junit.xml tests/integration diff --git a/.github/workflows/python-integration-tests.yml b/.github/workflows/python-integration-tests.yml index 76a5085..c1e1bc5 100644 --- a/.github/workflows/python-integration-tests.yml +++ b/.github/workflows/python-integration-tests.yml @@ -1,5 +1,4 @@ name: Integration tests - on: workflow_dispatch: inputs: @@ -17,11 +16,16 @@ on: default: 'staging' required: false type: string - branch: - required: false - type: string - description: 'Branch to run on' secrets: + FIREBOLT_USERNAME: + required: true + FIREBOLT_PASSWORD: + required: true + FIREBOLT_STG_USERNAME: + required: true + FIREBOLT_STG_PASSWORD: + required: true + # V2 secrets FIREBOLT_CLIENT_ID_STG_NEW_IDN: required: true FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: @@ -30,68 +34,14 @@ on: required: true FIREBOLT_CLIENT_SECRET_NEW_IDN: required: true - jobs: - integration-tests: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Set up Python 3.7 - uses: actions/setup-python@v2 - with: - python-version: 3.7 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install ".[dev]" - - - name: Determine env variables - run: | - if [ "${{ inputs.environment }}" == 'staging' ]; then - echo "CLIENT_ID=${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }}" >> "$GITHUB_ENV" - echo "CLIENT_SECRET=${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }}" >> "$GITHUB_ENV" - else - echo "CLIENT_ID=${{ secrets.FIREBOLT_CLIENT_ID_NEW_IDN }}" >> "$GITHUB_ENV" - echo "CLIENT_SECRET=${{ secrets.FIREBOLT_CLIENT_SECRET_NEW_IDN }}" >> "$GITHUB_ENV" - fi - - - name: Setup database and engine - id: setup - uses: firebolt-db/integration-testing-setup@v2 - with: - firebolt-client-id: ${{ env.CLIENT_ID }} - firebolt-client-secret: ${{ env.CLIENT_SECRET }} - account: "developer" - api-endpoint: "api.${{ inputs.environment }}.firebolt.io" - - - name: Restore cached failed tests - id: cache-tests-restore - uses: actions/cache/restore@v3 - with: - path: | - .pytest_cache/v/cache/lastfailed - key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} - - - name: Run integration tests - env: - SERVICE_ID: ${{ env.CLIENT_ID }} - SERVICE_SECRET: ${{ env.CLIENT_SECRET }} - DATABASE_NAME: ${{ steps.setup.outputs.database_name }} - ENGINE_NAME: ${{ steps.setup.outputs.engine_name }} - STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }} - FIREBOLT_BASE_URL: "api.${{ inputs.environment }}.firebolt.io" - ACCOUNT_NAME: "developer" - run: | - pytest --last-failed -o log_cli=true -o log_cli_level=INFO tests/integration - - - name: Save failed tests - id: cache-tests-save - uses: actions/cache/save@v3 - if: failure() - with: - path: | - .pytest_cache/v/cache/lastfailed - key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} + integration-test-v1: + uses: ./.github/workflows/integration-tests-v1.yml + with: + environment: ${{ inputs.environment }} + secrets: inherit + integration-test-v2: + uses: ./.github/workflows/integration-tests-v2.yml + with: + environment: ${{ inputs.environment }} + secrets: inherit diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml index 04ca88a..8d79934 100644 --- a/.github/workflows/security-scan.yml +++ b/.github/workflows/security-scan.yml @@ -8,8 +8,6 @@ on: type: string description: 'Branch to run on' secrets: - FOSSA_TOKEN: - required: true SONARCLOUD_TOKEN: required: true @@ -31,5 +29,4 @@ jobs: uses: firebolt-db/action-security-scan@main with: github-key: ${{ secrets.GITHUB_TOKEN }} - fossa-key: ${{ secrets.FOSSA_TOKEN }} sonar-key: ${{ secrets.SONARCLOUD_TOKEN }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 3186242..015fef9 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -23,12 +23,12 @@ jobs: uses: actions/checkout@v2 with: ref: ${{ inputs.branch }} - + - name: Set up Python 3.7 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.7 - + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -37,7 +37,7 @@ jobs: - name: Run unit tests run: | pytest --cov=src/ tests/unit --cov-report=xml - + - name: Upload coverage report uses: actions/upload-artifact@v2 with: @@ -55,7 +55,7 @@ jobs: colour=$(if [ $percentage_whole -ge 80 ]; then echo "green"; else echo "orange"; fi) echo "colour=$colour" >> $GITHUB_OUTPUT echo "covered=$percentage_whole" >> $GITHUB_OUTPUT - + - name: Create Coverage Badge uses: schneegans/dynamic-badges-action@v1.2.0 if: github.event_name == 'push' diff --git a/setup.cfg b/setup.cfg index 648ac77..9d3e66c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,7 +25,7 @@ project_urls = [options] packages = find: install_requires = - firebolt-sdk>=1.0.0a + firebolt-sdk>=1.1.0 sqlalchemy>=1.0.0 python_requires = >=3.7 package_dir = diff --git a/src/firebolt_db/firebolt_dialect.py b/src/firebolt_db/firebolt_dialect.py index 73cd1c2..7823d4a 100644 --- a/src/firebolt_db/firebolt_dialect.py +++ b/src/firebolt_db/firebolt_dialect.py @@ -5,7 +5,7 @@ import firebolt.db as dbapi import sqlalchemy.types as sqltypes -from firebolt.client.auth import Auth, ClientCredentials +from firebolt.client.auth import Auth, ClientCredentials, UsernamePassword from firebolt.db import Cursor from sqlalchemy.engine import Connection as AlchemyConnection from sqlalchemy.engine import ExecutionContext, default @@ -143,7 +143,7 @@ def create_connect_args(self, url: URL) -> Tuple[List, Dict]: # parameters are all passed as a string, we need to convert # bool flag to boolean for SDK compatibility token_cache_flag = bool(strtobool(parameters.pop("use_token_cache", "True"))) - auth = ClientCredentials(url.username, url.password, token_cache_flag) + auth = _determine_auth(url.username, url.password, token_cache_flag) kwargs: Dict[str, Union[str, Auth, Dict[str, Any], None]] = { "database": url.host or None, "auth": auth, @@ -356,3 +356,10 @@ def do_commit(self, dbapi_connection: AlchemyConnection) -> None: def get_is_nullable(column_is_nullable: int) -> bool: return column_is_nullable == 1 + + +def _determine_auth(key: str, secret: str, token_cache_flag: bool = True) -> Auth: + if "@" in key: + return UsernamePassword(key, secret, token_cache_flag) + else: + return ClientCredentials(key, secret, token_cache_flag) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 1257ffa..9cdfbeb 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -13,8 +13,8 @@ ENGINE_NAME_ENV = "ENGINE_NAME" DATABASE_NAME_ENV = "DATABASE_NAME" ACCOUNT_NAME_ENV = "ACCOUNT_NAME" -CLIENT_ID_ENV = "SERVICE_ID" -CLIENT_KEY_ENV = "SERVICE_SECRET" +CLIENT_ID_ENV = "CLIENT_ID" +CLIENT_KEY_ENV = "CLIENT_SECRET" def must_env(var_name: str) -> str: diff --git a/tests/unit/test_firebolt_dialect.py b/tests/unit/test_firebolt_dialect.py index c1a442d..361be1b 100644 --- a/tests/unit/test_firebolt_dialect.py +++ b/tests/unit/test_firebolt_dialect.py @@ -33,16 +33,16 @@ def test_create_dialect(self, dialect: FireboltDialect): assert isinstance(dialect.type_compiler, FireboltTypeCompiler) assert dialect.context == {} - def test_create_connect_args_service_account(self, dialect: FireboltDialect): + def test_create_connect_args_user_password(self, dialect: FireboltDialect): u = url.make_url( - "test_engine://test-sa-user-key:test_password@test_db_name/test_engine_name" + "test_engine://test-sa@user.com:test_password@test_db_name/test_engine_name" "?account_name=dummy" ) with mock.patch.dict(os.environ, {"FIREBOLT_BASE_URL": "test_url"}): result_list, result_dict = dialect.create_connect_args(u) assert result_dict["engine_name"] == "test_engine_name" - assert result_dict["auth"].client_id == "test-sa-user-key" - assert result_dict["auth"].client_secret == "test_password" + assert result_dict["auth"].username == "test-sa@user.com" + assert result_dict["auth"].password == "test_password" assert result_dict["auth"]._use_token_cache is True assert result_dict["database"] == "test_db_name" assert result_dict["api_endpoint"] == "test_url"