diff --git a/.github/composite_actions/run_xcodebuild/action.yml b/.github/composite_actions/run_xcodebuild/action.yml
index 1a39188604..d5567939bf 100644
--- a/.github/composite_actions/run_xcodebuild/action.yml
+++ b/.github/composite_actions/run_xcodebuild/action.yml
@@ -19,6 +19,14 @@ inputs:
required: false
type: string
default: 'iphonesimulator'
+ cloned_source_packages_path:
+ required: false
+ type: string
+ default: ''
+ derived_data_path:
+ required: false
+ type: string
+ default: ''
disable_package_resolution:
required: false
type: boolean
@@ -36,6 +44,8 @@ runs:
SCHEME: ${{ inputs.scheme }}
PROJECT_PATH: ${{ inputs.project_path }}
XCODE_PATH: ${{ inputs.xcode_path }}
+ CLONED_SOURCE_PACKAGES_PATH: ${{ inputs.cloned_source_packages_path }}
+ DERIVED_DATA_PATH: ${{ inputs.derived_data_path }}
run: |
if [ ! -z "$PROJECT_PATH" ]; then
cd $PROJECT_PATH
@@ -46,8 +56,20 @@ runs:
otherFlags="${{ inputs.other_flags }}"
if [ "${{ inputs.disable_package_resolution }}" == "true" ]; then
+ echo "Disabling Automatic Package Resolution"
otherFlags+=" -disableAutomaticPackageResolution"
fi
+
+ if [ ! -z "$DERIVED_DATA_PATH" ]; then
+ echo "Using custom DerivedData path"
+ otherFlags+=" -derivedDataPath $DERIVED_DATA_PATH"
+ fi
+
+ if [ ! -z "$CLONED_SOURCE_PACKAGES_PATH" ]; then
+ echo "Using custom cloned source packages path"
+ otherFlags+=" -clonedSourcePackagesDirPath $CLONED_SOURCE_PACKAGES_PATH"
+ fi
+
xcodebuild -version
xcodebuild build -scheme $SCHEME -sdk '${{ inputs.sdk }}' -destination '${{ inputs.destination }}' $otherFlags | xcpretty --simple --color --report junit && exit ${PIPESTATUS[0]}
shell: bash
\ No newline at end of file
diff --git a/.github/workflows/build_amplify_swift.yml b/.github/workflows/build_amplify_swift.yml
index 35ed0b77f3..67b5a835b6 100644
--- a/.github/workflows/build_amplify_swift.yml
+++ b/.github/workflows/build_amplify_swift.yml
@@ -1,33 +1,34 @@
-name: Build | Amplify Swift
+name: Build Amplify-Package for the given platform
on:
workflow_call:
inputs:
- identifier:
- required: true
+ platform:
type: string
- workflow_dispatch:
- push:
- branches-ignore:
- - main
- - release
+ required: true
permissions:
- contents: read
-
-concurrency:
- group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }}
- cancel-in-progress: ${{ github.ref_name != 'main'}}
+ contents: read
+ actions: write
jobs:
- build-amplify-swift-iOS:
+ build-amplify-swift:
+ name: Build Amplify-Package | ${{ inputs.platform }}
runs-on: macos-13
- timeout-minutes: 20
steps:
- - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
+ - name: Checkout repository
+ uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
with:
persist-credentials: false
- - name: Attempt to restore dependencies cache
- id: cache-packages
+
+ - name: Get build parameters for ${{ inputs.platform }}
+ id: platform
+ uses: ./.github/composite_actions/get_platform_parameters
+ with:
+ platform: ${{ inputs.platform }}
+ xcode_version: '14.3'
+
+ - name: Attempt to use the dependencies cache
+ id: dependencies-cache
timeout-minutes: 4
continue-on-error: true
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
@@ -36,131 +37,47 @@ jobs:
key: amplify-packages-${{ hashFiles('Package.resolved') }}
restore-keys: |
amplify-packages-
- - name: Build Amplify Swift for iOS
- uses: ./.github/composite_actions/run_xcodebuild
- with:
- scheme: Amplify-Package
- destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4'
- xcode_path: '/Applications/Xcode_14.3.app'
- disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
- other_flags: '-derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify'
- - name: Save the dependencies cache if necessary
- if: steps.cache-packages.outputs.cache-hit != 'true' && github.ref_name == 'main'
- uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ~/Library/Developer/Xcode/DerivedData/Amplify
- key: ${{ steps.cache-packages.outputs.cache-primary-key }}
- build-amplify-swift-macOS:
- runs-on: macos-13
- timeout-minutes: 20
- steps:
- - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
- with:
- persist-credentials: false
- - name: Attempt to restore dependencies cache
- id: cache-packages
+ - name: Attempt to restore the build cache from main
+ id: build-cache
timeout-minutes: 4
continue-on-error: true
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
- path: ~/Library/Developer/Xcode/DerivedData/Amplify
- key: amplify-packages-${{ hashFiles('Package.resolved') }}
- restore-keys: |
- amplify-packages-
- - name: Build Amplify Swift for macOS
- uses: ./.github/composite_actions/run_xcodebuild
- with:
- scheme: Amplify-Package
- destination: platform=macOS,arch=x86_64
- sdk: macosx
- xcode_path: '/Applications/Xcode_14.3.app'
- disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
- other_flags: '-derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify'
- - name: Save the dependencies cache if necessary
- if: steps.cache-packages.outputs.cache-hit != 'true' && github.ref_name == 'main'
- uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ~/Library/Developer/Xcode/DerivedData/Amplify
- key: ${{ steps.cache-packages.outputs.cache-primary-key }}
+ path: ${{ github.workspace }}/Build
+ key: Amplify-${{ inputs.platform }}-build-cache
- build-amplify-swift-tvOS:
- runs-on: macos-13
- timeout-minutes: 20
- steps:
- - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
- with:
- persist-credentials: false
- - name: Attempt to restore dependencies cache
- timeout-minutes: 4
- id: cache-packages
+ - name: Build Amplify for Swift
+ id: build-package
continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ~/Library/Developer/Xcode/DerivedData/Amplify
- key: amplify-packages-${{ hashFiles('Package.resolved') }}
- restore-keys: |
- amplify-packages-
- - name: Build Amplify Swift for tvOS
uses: ./.github/composite_actions/run_xcodebuild
with:
scheme: Amplify-Package
- destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=16.4
- sdk: appletvsimulator
- xcode_path: '/Applications/Xcode_14.3.app'
- disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
- other_flags: '-derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify'
- - name: Save the dependencies cache if necessary
- if: steps.cache-packages.outputs.cache-hit != 'true' && github.ref_name == 'main'
+ destination: ${{ steps.platform.outputs.destination }}
+ sdk: ${{ steps.platform.outputs.sdk }}
+ xcode_path: /Applications/Xcode_14.3.app
+ cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
+ derived_data_path: ${{ github.workspace }}/Build
+ disable_package_resolution: ${{ steps.dependencies-cache.outputs.cache-hit }}
+
+ - name: Save the dependencies cache in main
+ if: steps.dependencies-cache.outputs.cache-hit != 'true' && github.ref_name == 'main'
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ~/Library/Developer/Xcode/DerivedData/Amplify
- key: ${{ steps.cache-packages.outputs.cache-primary-key }}
-
- build-amplify-swift-watchOS:
- runs-on: macos-13
- timeout-minutes: 20
- steps:
- - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
- with:
- persist-credentials: false
- - name: Attempt to restore dependencies cache
- id: cache-packages
- timeout-minutes: 4
+ key: ${{ steps.dependencies-cache.outputs.cache-primary-key }}
+
+ - name: Delete the old build cache
+ if: steps.build-cache.outputs.cache-hit && github.ref_name == 'main'
+ env:
+ GH_TOKEN: ${{ github.token }}
continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ~/Library/Developer/Xcode/DerivedData/Amplify
- key: amplify-packages-${{ hashFiles('Package.resolved') }}
- restore-keys: |
- amplify-packages-
- - name: Build Amplify Swift for watchOS
- uses: ./.github/composite_actions/run_xcodebuild
- with:
- scheme: Amplify-Package
- destination: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.4
- sdk: watchsimulator
- xcode_path: '/Applications/Xcode_14.3.app'
- disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
- other_flags: '-derivedDataPath Build -clonedSourcePackagesDirPath ~/Library/Developer/Xcode/DerivedData/Amplify'
- - name: Save the dependencies cache if necessary
- if: steps.cache-packages.outputs.cache-hit != 'true' && github.ref_name == 'main'
+ run: |
+ gh cache delete ${{ steps.build-cache.outputs.cache-primary-key }}
+
+ - name: Save the build cache
+ if: github.ref_name == 'main'
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
- path: ~/Library/Developer/Xcode/DerivedData/Amplify
- key: ${{ steps.cache-packages.outputs.cache-primary-key }}
-
- confirm-pass:
- runs-on: ubuntu-latest
- name: Confirm Passing Build Steps
- if: ${{ !cancelled() }}
- needs: [
- build-amplify-swift-iOS,
- build-amplify-swift-macOS,
- build-amplify-swift-tvOS,
- build-amplify-swift-watchOS
- ]
- env:
- EXIT_CODE: ${{ contains(needs.*.result, 'failure') && 1 || 0 }}
- steps:
- - run: exit $EXIT_CODE
+ path: ${{ github.workspace }}/Build
+ key: ${{ steps.build-cache.outputs.cache-primary-key }}
\ No newline at end of file
diff --git a/.github/workflows/build_amplify_swift_platforms.yml b/.github/workflows/build_amplify_swift_platforms.yml
new file mode 100644
index 0000000000..54fc16d50e
--- /dev/null
+++ b/.github/workflows/build_amplify_swift_platforms.yml
@@ -0,0 +1,67 @@
+name: Build | Amplify Swift
+on:
+ workflow_call:
+ inputs:
+ identifier:
+ required: true
+ type: string
+ workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
+ push:
+ branches-ignore:
+ - main
+ - release
+
+permissions:
+ contents: read
+ actions: write
+
+concurrency:
+ group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: ${{ github.ref_name != 'main'}}
+
+jobs:
+ build-amplify-swift:
+ name: Build Amplify Swift for ${{ matrix.platform }}
+ strategy:
+ fail-fast: false
+ matrix:
+ platform: [iOS, macOS, tvOS, watchOS]
+ exclude:
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.macos == 'false' && 'macOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
+ uses: ./.github/workflows/build_amplify_swift.yml
+ with:
+ platform: ${{ matrix.platform }}
+
+ confirm-pass:
+ runs-on: ubuntu-latest
+ name: Confirm Passing Build Steps
+ if: ${{ !cancelled() }}
+ needs: [ build-amplify-swift ]
+ env:
+ EXIT_CODE: ${{ contains(needs.*.result, 'failure') && 1 || 0 }}
+ steps:
+ - run: exit $EXIT_CODE
diff --git a/.github/workflows/deploy_package.yml b/.github/workflows/deploy_package.yml
index 209bcf863a..37e6b7c75e 100644
--- a/.github/workflows/deploy_package.yml
+++ b/.github/workflows/deploy_package.yml
@@ -16,7 +16,7 @@ permissions:
jobs:
build-amplify-swift:
name: Build Amplify package
- uses: ./.github/workflows/build_amplify_swift.yml
+ uses: ./.github/workflows/build_amplify_swift_platforms.yml
with:
identifier: 'workflow-call-build-amplify-swift'
diff --git a/.github/workflows/integ_test_analytics.yml b/.github/workflows/integ_test_analytics.yml
index f88d59e0ce..6f0de7f368 100644
--- a/.github/workflows/integ_test_analytics.yml
+++ b/.github/workflows/integ_test_analytics.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSPinpointAnalyticsPluginIntegrationTestsWatch' || 'AWSPinpointAnalyticsPluginIntegrationTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSPinpointAnalyticsPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/Analytics/Tests/AnalyticsHostApp
xcode_version: '14.3'
resource_subfolder: analytics
diff --git a/.github/workflows/integ_test_api_functional.yml b/.github/workflows/integ_test_api_functional.yml
index c8874243fe..a63a05eb28 100644
--- a/.github/workflows/integ_test_api_functional.yml
+++ b/.github/workflows/integ_test_api_functional.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSAPIPluginFunctionalTestsWatch' || 'AWSAPIPluginFunctionalTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSAPIPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/API/Tests/APIHostApp
xcode_version: '14.3'
resource_subfolder: api
diff --git a/.github/workflows/integ_test_api_graphql_auth_directive.yml b/.github/workflows/integ_test_api_graphql_auth_directive.yml
index 46ff30d925..33dba6c1d5 100644
--- a/.github/workflows/integ_test_api_graphql_auth_directive.yml
+++ b/.github/workflows/integ_test_api_graphql_auth_directive.yml
@@ -26,13 +26,12 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: AWSAPIPluginGraphQLAuthDirectiveTests
platform: ${{ matrix.platform }}
- build_cache_key: AWSAPIPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/API/Tests/APIHostApp
xcode_version: '14.3'
resource_subfolder: api
diff --git a/.github/workflows/integ_test_api_graphql_iam.yml b/.github/workflows/integ_test_api_graphql_iam.yml
index 94dccec965..e1631664ea 100644
--- a/.github/workflows/integ_test_api_graphql_iam.yml
+++ b/.github/workflows/integ_test_api_graphql_iam.yml
@@ -26,13 +26,12 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: AWSAPIPluginGraphQLIAMTests
platform: ${{ matrix.platform }}
- build_cache_key: AWSAPIPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/API/Tests/APIHostApp
xcode_version: '14.3'
resource_subfolder: api
diff --git a/.github/workflows/integ_test_api_graphql_lambda_auth.yml b/.github/workflows/integ_test_api_graphql_lambda_auth.yml
index f1f699f851..49388053a2 100644
--- a/.github/workflows/integ_test_api_graphql_lambda_auth.yml
+++ b/.github/workflows/integ_test_api_graphql_lambda_auth.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSAPIPluginGraphQLLambdaAuthTestsWatch' || 'AWSAPIPluginGraphQLLambdaAuthTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSAPIPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/API/Tests/APIHostApp
xcode_version: '14.3'
resource_subfolder: api
diff --git a/.github/workflows/integ_test_api_graphql_lazy_load.yml b/.github/workflows/integ_test_api_graphql_lazy_load.yml
index 332e71eec5..849c329625 100644
--- a/.github/workflows/integ_test_api_graphql_lazy_load.yml
+++ b/.github/workflows/integ_test_api_graphql_lazy_load.yml
@@ -26,13 +26,12 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: AWSAPIPluginLazyLoadTests
platform: ${{ matrix.platform }}
- build_cache_key: AWSAPIPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/API/Tests/APIHostApp
xcode_version: '14.3'
resource_subfolder: api
diff --git a/.github/workflows/integ_test_api_graphql_user_pool.yml b/.github/workflows/integ_test_api_graphql_user_pool.yml
index e3f10fd1eb..21f1205eb6 100644
--- a/.github/workflows/integ_test_api_graphql_user_pool.yml
+++ b/.github/workflows/integ_test_api_graphql_user_pool.yml
@@ -26,13 +26,12 @@ jobs:
matrix:
platform: [iOS, tvOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: AWSAPIPluginGraphQLUserPoolTests
platform: ${{ matrix.platform }}
- build_cache_key: AWSAPIPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/API/Tests/APIHostApp
xcode_version: '14.3'
resource_subfolder: api
diff --git a/.github/workflows/integ_test_api_rest_iam.yml b/.github/workflows/integ_test_api_rest_iam.yml
index aa3b203b3f..18a14615bf 100644
--- a/.github/workflows/integ_test_api_rest_iam.yml
+++ b/.github/workflows/integ_test_api_rest_iam.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSAPIPluginRESTIAMTestsWatch' || 'AWSAPIPluginRESTIAMTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSAPIPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/API/Tests/APIHostApp
xcode_version: '14.3'
resource_subfolder: api
diff --git a/.github/workflows/integ_test_api_rest_user_pool.yml b/.github/workflows/integ_test_api_rest_user_pool.yml
index c88f87099b..96c141316e 100644
--- a/.github/workflows/integ_test_api_rest_user_pool.yml
+++ b/.github/workflows/integ_test_api_rest_user_pool.yml
@@ -26,13 +26,12 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: AWSAPIPluginRESTUserPoolTests
platform: ${{ matrix.platform }}
- build_cache_key: AWSAPIPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/API/Tests/APIHostApp
xcode_version: '14.3'
resource_subfolder: api
diff --git a/.github/workflows/integ_test_auth.yml b/.github/workflows/integ_test_auth.yml
index fef7e2c13a..e90900e0ee 100644
--- a/.github/workflows/integ_test_auth.yml
+++ b/.github/workflows/integ_test_auth.yml
@@ -36,14 +36,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AuthIntegrationTestsWatch' || 'AuthIntegrationTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSCognitoAuthPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/Auth/Tests/AuthHostApp/
xcode_version: '14.3'
resource_subfolder: auth
@@ -56,7 +55,6 @@ jobs:
with:
scheme: AuthHostedUIApp
platform: iOS
- build_cache_key: AWSCognitoAuthPlugin-iOS-latest-build-main
project_path: ./AmplifyPlugins/Auth/Tests/AuthHostedUIApp/
xcode_version: '14.3'
resource_subfolder: auth
diff --git a/.github/workflows/integ_test_datastore_auth_cognito.yml b/.github/workflows/integ_test_datastore_auth_cognito.yml
index 7ed891f883..cd611d7f82 100644
--- a/.github/workflows/integ_test_datastore_auth_cognito.yml
+++ b/.github/workflows/integ_test_datastore_auth_cognito.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSDataStorePluginAuthCognitoTestsWatch' || 'AWSDataStorePluginAuthCognitoTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSDataStorePlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/DataStore/Tests/DataStoreHostApp
xcode_version: '14.3'
resource_subfolder: datastore
diff --git a/.github/workflows/integ_test_datastore_auth_iam.yml b/.github/workflows/integ_test_datastore_auth_iam.yml
index 3b2f4af585..9c5c25a948 100644
--- a/.github/workflows/integ_test_datastore_auth_iam.yml
+++ b/.github/workflows/integ_test_datastore_auth_iam.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSDataStorePluginAuthIAMTestsWatch' || 'AWSDataStorePluginAuthIAMTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSDataStorePlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/DataStore/Tests/DataStoreHostApp
xcode_version: '14.3'
resource_subfolder: datastore
diff --git a/.github/workflows/integ_test_datastore_base.yml b/.github/workflows/integ_test_datastore_base.yml
index 06c51f8785..5a3ca820df 100644
--- a/.github/workflows/integ_test_datastore_base.yml
+++ b/.github/workflows/integ_test_datastore_base.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSDataStorePluginIntegrationTestsWatch' || 'AWSDataStorePluginIntegrationTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSDataStorePlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/DataStore/Tests/DataStoreHostApp
xcode_version: '14.3'
resource_subfolder: datastore
diff --git a/.github/workflows/integ_test_datastore_cpk.yml b/.github/workflows/integ_test_datastore_cpk.yml
index 8e97bb1e07..350def730c 100644
--- a/.github/workflows/integ_test_datastore_cpk.yml
+++ b/.github/workflows/integ_test_datastore_cpk.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSDataStorePluginCPKTestsWatch' || 'AWSDataStorePluginCPKTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSDataStorePlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/DataStore/Tests/DataStoreHostApp
xcode_version: '14.3'
resource_subfolder: datastore
diff --git a/.github/workflows/integ_test_datastore_lazy_load.yml b/.github/workflows/integ_test_datastore_lazy_load.yml
index 388d28f1d2..c54e405359 100644
--- a/.github/workflows/integ_test_datastore_lazy_load.yml
+++ b/.github/workflows/integ_test_datastore_lazy_load.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSDataStorePluginLazyLoadTestsWatch' || 'AWSDataStorePluginLazyLoadTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSDataStorePlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/DataStore/Tests/DataStoreHostApp
xcode_version: '14.3'
resource_subfolder: datastore
diff --git a/.github/workflows/integ_test_datastore_multi_auth.yml b/.github/workflows/integ_test_datastore_multi_auth.yml
index e8900c4f24..df5ccd69bd 100644
--- a/.github/workflows/integ_test_datastore_multi_auth.yml
+++ b/.github/workflows/integ_test_datastore_multi_auth.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSDataStorePluginMultiAuthTestsWatch' || 'AWSDataStorePluginMultiAuthTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSDataStorePlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/DataStore/Tests/DataStoreHostApp
xcode_version: '14.3'
resource_subfolder: datastore
diff --git a/.github/workflows/integ_test_datastore_v2.yml b/.github/workflows/integ_test_datastore_v2.yml
index f842b38c13..1b44b75248 100644
--- a/.github/workflows/integ_test_datastore_v2.yml
+++ b/.github/workflows/integ_test_datastore_v2.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSDataStorePluginV2TestsWatch' || 'AWSDataStorePluginV2Tests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSDataStorePlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/DataStore/Tests/DataStoreHostApp
xcode_version: '14.3'
resource_subfolder: datastore
diff --git a/.github/workflows/integ_test_geo.yml b/.github/workflows/integ_test_geo.yml
index 7effa17ab9..2bc9cb0ced 100644
--- a/.github/workflows/integ_test_geo.yml
+++ b/.github/workflows/integ_test_geo.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSLocationGeoPluginIntegrationTestsWatch' || 'AWSLocationGeoPluginIntegrationTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSLocationGeoPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/Geo/Tests/GeoHostApp/
xcode_version: '14.3'
resource_subfolder: geo
diff --git a/.github/workflows/integ_test_logging.yml b/.github/workflows/integ_test_logging.yml
index 770b87a2fb..d591dcfe33 100644
--- a/.github/workflows/integ_test_logging.yml
+++ b/.github/workflows/integ_test_logging.yml
@@ -31,16 +31,15 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSCloudWatchLoggingPluginIntegrationTestsWatch' || 'AWSCloudWatchLoggingPluginIntegrationTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSCloudWatchLoggingPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/Logging/Tests/AWSCloudWatchLoggingPluginHostApp
xcode_version: ${{ matrix.platform == 'watchOS' && '15.0' || '14.3' }}
resource_subfolder: logging
- timeout-minutes: 45
+ timeout-minutes: 60
secrets: inherit
diff --git a/.github/workflows/integ_test_predictions.yml b/.github/workflows/integ_test_predictions.yml
index a555d2d43b..7cf53e3378 100644
--- a/.github/workflows/integ_test_predictions.yml
+++ b/.github/workflows/integ_test_predictions.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSPredictionsPluginIntegrationTestsWatch' || 'AWSPredictionsPluginIntegrationTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSPredictionsPlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/Predictions/Tests/PredictionsHostApp
xcode_version: '14.3'
resource_subfolder: predictions
diff --git a/.github/workflows/integ_test_push_notifications.yml b/.github/workflows/integ_test_push_notifications.yml
index 0cbc663f54..5f0e1df437 100644
--- a/.github/workflows/integ_test_push_notifications.yml
+++ b/.github/workflows/integ_test_push_notifications.yml
@@ -34,9 +34,9 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
@@ -78,14 +78,14 @@ jobs:
restore-keys: |
amplify-packages-
- - name: Attempt to use the provided build cache
+ - name: Attempt to restore the build cache
id: build-cache
timeout-minutes: 4
continue-on-error: true
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
- key: AWSPinpointPushNotificationsPlugin-${{ matrix.platform }}-latest-build-main
+ key: Amplify-${{ matrix.platform }}-build-cache
- name: Run Local Server
run: |
diff --git a/.github/workflows/integ_test_storage.yml b/.github/workflows/integ_test_storage.yml
index af7e50b00f..22fc5bb90e 100644
--- a/.github/workflows/integ_test_storage.yml
+++ b/.github/workflows/integ_test_storage.yml
@@ -31,14 +31,13 @@ jobs:
matrix:
platform: [iOS, tvOS, watchOS]
exclude:
- - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'Dummy' }}
- - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'Dummy' }}
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
uses: ./.github/workflows/run_integration_tests.yml
with:
scheme: ${{ matrix.platform == 'watchOS' && 'AWSS3StoragePluginIntegrationTestsWatch' || 'AWSS3StoragePluginIntegrationTests' }}
platform: ${{ matrix.platform }}
- build_cache_key: AWSS3StoragePlugin-${{ matrix.platform }}-latest-build-main
project_path: ./AmplifyPlugins/Storage/Tests/StorageHostApp/
xcode_version: '14.3'
resource_subfolder: storage
diff --git a/.github/workflows/nightly_repeated_unittest.yml b/.github/workflows/nightly_repeated_unittest.yml
index fbd3be44d5..c5e6aa151a 100644
--- a/.github/workflows/nightly_repeated_unittest.yml
+++ b/.github/workflows/nightly_repeated_unittest.yml
@@ -32,7 +32,7 @@ jobs:
CoreMLPredictionsPlugin,
InternalAWSPinpointUnitTests
]
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: ${{ matrix.scheme }}
timeout-minutes: 50
diff --git a/.github/workflows/run_integration_tests.yml b/.github/workflows/run_integration_tests.yml
index a96200bc3b..500f10095a 100644
--- a/.github/workflows/run_integration_tests.yml
+++ b/.github/workflows/run_integration_tests.yml
@@ -25,10 +25,6 @@ on:
required: false
type: number
default: 30
- build_cache_key:
- description: 'The key used to retrieve the build cache'
- required: true
- type: string
permissions:
id-token: write
@@ -77,14 +73,14 @@ jobs:
restore-keys: |
amplify-packages-
- - name: Attempt to use the provided build cache
+ - name: Attempt to restore the build cache
id: build-cache
timeout-minutes: 4
continue-on-error: true
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: ${{ github.workspace }}/Build
- key: ${{ inputs.build_cache_key }}
+ key: Amplify-${{ inputs.platform }}-build-cache
- name: Run ${{ inputs.platform }} Integration Tests
id: run-tests
diff --git a/.github/workflows/run_unit_tests.yml b/.github/workflows/run_unit_tests.yml
new file mode 100644
index 0000000000..518f74b1a4
--- /dev/null
+++ b/.github/workflows/run_unit_tests.yml
@@ -0,0 +1,110 @@
+name: Run Unit Tests for the given parameters
+on:
+ workflow_call:
+ inputs:
+ scheme:
+ description: 'The scheme to run the tests'
+ required: true
+ type: string
+ platform:
+ description: 'The platform in which to run these tests'
+ required: true
+ type: string
+ project_path:
+ required: false
+ type: string
+ xcode_version:
+ description: 'The version of Xcode used to run these tests'
+ required: true
+ type: string
+ timeout-minutes:
+ description: 'The timeout for each execution'
+ required: false
+ type: number
+ default: 30
+ generate_coverage_report:
+ description: 'Whether to generate and report code coverage'
+ required: false
+ type: boolean
+ default: false
+
+permissions:
+ contents: read
+
+jobs:
+ unit-tests:
+ name: ${{ inputs.platform }} Tests | ${{ inputs.scheme }}
+ runs-on: macos-13
+ timeout-minutes: ${{ inputs.timeout-minutes }}
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
+ with:
+ persist-credentials: false
+
+ - name: Get build parameters for ${{ inputs.platform}}
+ id: platform
+ uses: ./.github/composite_actions/get_platform_parameters
+ with:
+ platform: ${{ inputs.platform }}
+ xcode_version: ${{ inputs.xcode_version }}
+
+ - name: Attempt to use the dependencies cache
+ id: dependencies-cache
+ timeout-minutes: 4
+ continue-on-error: true
+ uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
+ with:
+ path: ~/Library/Developer/Xcode/DerivedData/Amplify
+ key: amplify-packages-${{ hashFiles('Package.resolved') }}
+ restore-keys: |
+ amplify-packages-
+
+ - name: Attempt to restore the build cache
+ id: build-cache
+ timeout-minutes: 4
+ continue-on-error: true
+ uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
+ with:
+ path: ${{ github.workspace }}/Build
+ key: Amplify-${{ inputs.platform }}-build-cache
+
+ - name: Run ${{ inputs.platform }} Unit Tests
+ id: run-tests
+ continue-on-error: true
+ uses: ./.github/composite_actions/run_xcodebuild_test
+ with:
+ scheme: ${{ inputs.scheme }}
+ destination: ${{ steps.platform.outputs.destination }}
+ sdk: ${{ steps.platform.outputs.sdk }}
+ xcode_path: /Applications/Xcode_${{ inputs.xcode_version }}.app
+ generate_coverage: ${{ inputs.generate_coverage_report }}
+ cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
+ derived_data_path: ${{ github.workspace }}/Build
+ disable_package_resolution: ${{ steps.dependencies-cache.outputs.cache-hit }}
+ other_flags: -test-iterations 3 -retry-tests-on-failure
+
+ - name: Retry ${{ inputs.platform }} Unit Tests
+ if: steps.run-tests.outcome=='failure'
+ id: retry-tests
+ uses: ./.github/composite_actions/run_xcodebuild_test
+ with:
+ scheme: ${{ inputs.scheme }}
+ destination: ${{ steps.platform.outputs.destination }}
+ sdk: ${{ steps.platform.outputs.sdk }}
+ xcode_path: /Applications/Xcode_${{ inputs.xcode_version }}.app
+ project_path: ${{ inputs.project_path }}
+ generate_coverage: ${{ inputs.generate_coverage_report }}
+ cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
+ derived_data_path: ${{ github.workspace }}/Build
+ disable_package_resolution: true
+ other_flags: -test-iterations 3 -retry-tests-on-failure
+
+ - name: Store Coverage Report File
+ if: ${{ inputs.generate_coverage_report == true }}
+ uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce #v3.1.2
+ with:
+ name: ${{ inputs.scheme }}-Coverage-${{ github.sha }}
+ path: ${{ github.workspace }}/${{ inputs.scheme }}-Coverage.lcov
+ if-no-files-found: error
+ retention-days: 1
diff --git a/.github/workflows/run_unit_tests_platforms.yml b/.github/workflows/run_unit_tests_platforms.yml
new file mode 100644
index 0000000000..f5df65aafa
--- /dev/null
+++ b/.github/workflows/run_unit_tests_platforms.yml
@@ -0,0 +1,41 @@
+name: Run Unit Tests for the given scheme on all supported platforms
+on:
+ workflow_call:
+ inputs:
+ scheme:
+ description: 'The scheme to run the tests'
+ required: true
+ type: string
+ timeout-minutes:
+ description: 'The timeout for each execution'
+ required: false
+ type: number
+ default: 30
+ generate_coverage_report:
+ description: 'Whether to generate and report code coverage'
+ required: false
+ type: boolean
+ default: false
+
+permissions:
+ contents: read
+
+jobs:
+ run-unit-tests:
+ name: ${{ matrix.platform }} Tests | ${{ inputs.scheme }}
+ strategy:
+ fail-fast: false
+ matrix:
+ platform: [iOS, macOS, tvOS, watchOS]
+ exclude:
+ - platform: ${{ github.event.inputs.ios == 'false' && 'iOS' || 'None' }}
+ - platform: ${{ github.event.inputs.macos == 'false' && 'macOS' || 'None' }}
+ - platform: ${{ github.event.inputs.tvos == 'false' && 'tvOS' || 'None' }}
+ - platform: ${{ github.event.inputs.watchos == 'false' && 'watchOS' || 'None' }}
+ uses: ./.github/workflows/run_unit_tests.yml
+ with:
+ scheme: ${{ inputs.scheme }}
+ platform: ${{ matrix.platform }}
+ xcode_version: '14.3'
+ generate_coverage_report: ${{ github.event_name != 'workflow_dispatch' && matrix.platform == 'iOS' && inputs.generate_coverage_report }}
+ timeout-minutes: ${{ inputs.timeout-minutes }}
\ No newline at end of file
diff --git a/.github/workflows/run_xcodebuild_test_platforms.yml b/.github/workflows/run_xcodebuild_test_platforms.yml
deleted file mode 100644
index b0b691a6be..0000000000
--- a/.github/workflows/run_xcodebuild_test_platforms.yml
+++ /dev/null
@@ -1,425 +0,0 @@
-name: Run xcodebuild test on all supported platforms
-on:
- workflow_call:
- inputs:
- scheme:
- description: 'The scheme to run the tests'
- required: true
- type: string
- timeout-minutes:
- description: 'The timeout for each execution'
- required: false
- type: number
- default: 30
- generate_coverage_report:
- description: 'Whether to generate and report code coverage'
- required: false
- type: boolean
- default: false
- retry_on_error:
- description: 'Whether to automatically retry if the tests fail'
- required: false
- type: boolean
- default: true
- other_flags:
- required: false
- type: string
- default: ''
-
-env:
- SCHEME: ${{ inputs.scheme }}
- RETRY_ON_ERROR: ${{ inputs.retry_on_error }}
-
-permissions:
- contents: read
- actions: write
-
-jobs:
- test-iOS:
- name: ${{ inputs.scheme }} iOS Tests
- runs-on: macos-13
- timeout-minutes: ${{ inputs.timeout-minutes }}
- steps:
- - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
- with:
- persist-credentials: false
- - name: Attempt to restore dependencies cache
- id: cache-packages
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ~/Library/Developer/Xcode/DerivedData/Amplify
- key: amplify-packages-${{ hashFiles('Package.resolved') }}
- restore-keys: |
- amplify-packages-
- - name: Attempt to restore the build cache for this SHA
- id: restore-build
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-iOS-build-${{ github.sha }}
- restore-keys: |
- ${{ env.SCHEME }}-iOS-build-
- - name: Attempt to restore the build cache from main
- if: steps.restore-build.outputs.cache-hit != 'true'
- id: restore-main-build
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-iOS-latest-build-main
- - name: Run iOS Test Suite
- id: run-tests
- continue-on-error: ${{ env.RETRY_ON_ERROR == 'true' }}
- uses: ./.github/composite_actions/run_xcodebuild_test
- with:
- scheme: ${{ env.SCHEME }}
- destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4'
- xcode_path: '/Applications/Xcode_14.3.app'
- generate_coverage: ${{ inputs.generate_coverage_report }}
- cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
- derived_data_path: ${{ github.workspace }}/Build
- disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
- test_without_building: ${{ steps.restore-build.outputs.cache-hit }}
- other_flags: ${{ inputs.other_flags }}
- - name: Retry iOS Test Suite if needed
- if: inputs.retry_on_error == true && steps.run-tests.outcome=='failure'
- id: retry-tests
- uses: ./.github/composite_actions/run_xcodebuild_test
- with:
- scheme: ${{ env.SCHEME }}
- destination: 'platform=iOS Simulator,name=iPhone 14,OS=16.4'
- xcode_path: '/Applications/Xcode_14.3.app'
- generate_coverage: ${{ inputs.generate_coverage_report }}
- cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
- derived_data_path: ${{ github.workspace }}/Build
- disable_package_resolution: true
- # Only test without building when this exact SHA was cached or we did not restore the build from main.
- test_without_building: ${{ steps.restore-build.outputs.cache-hit || !steps.restore-main-build.outputs.cache-hit }}
- other_flags: ${{ inputs.other_flags }}
- - name: Save the SHA build cache for re-runs
- if: failure() && steps.retry-tests.outcome=='failure'
- uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-iOS-build-${{ github.sha }}
- - name: Delete the SHA build cache on re-run success
- if: steps.restore-build.outputs.cache-matched-key
- env:
- GH_TOKEN: ${{ github.token }}
- continue-on-error: true
- run: |
- gh cache delete ${{ steps.restore-build.outputs.cache-matched-key }}
- shell: bash
- - name: Delete the old build cache on main
- if: github.ref_name == 'main' && steps.restore-main-build.outputs.cache-hit
- env:
- GH_TOKEN: ${{ github.token }}
- continue-on-error: true
- run: |
- gh cache delete ${{ steps.restore-main-build.outputs.cache-primary-key }}
- shell: bash
- - name: Save the new build cache on main
- if: github.ref_name == 'main'
- uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ steps.restore-main-build.outputs.cache-primary-key }}
- - name: Upload Report File
- if: ${{ inputs.generate_coverage_report == true }}
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce #v3.1.2
- with:
- name: ${{ env.SCHEME }}-Coverage-${{ github.sha }}
- path: ${{ github.workspace }}/${{ env.SCHEME }}-Coverage.lcov
- if-no-files-found: error
- retention-days: 1
-
-
- test-macOS:
- name: ${{ inputs.scheme }} macOS Tests
- runs-on: macos-13
- timeout-minutes: ${{ inputs.timeout-minutes }}
- steps:
- - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
- with:
- persist-credentials: false
- - name: Attempt to restore dependencies cache
- id: cache-packages
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ~/Library/Developer/Xcode/DerivedData/Amplify
- key: amplify-packages-${{ hashFiles('Package.resolved') }}
- restore-keys: |
- amplify-packages-
- - name: Attempt to restore the build cache for this SHA
- id: restore-build
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-macOS-build-${{ github.sha }}
- restore-keys: |
- ${{ env.SCHEME }}-macOS-build-
- - name: Attempt to restore the build cache from main
- if: steps.restore-build.outputs.cache-hit != 'true'
- id: restore-main-build
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-macOS-latest-build-main
- - name: Run macOS Test Suite
- id: run-tests
- continue-on-error: ${{ env.RETRY_ON_ERROR == 'true' }}
- uses: ./.github/composite_actions/run_xcodebuild_test
- with:
- scheme: ${{ env.SCHEME }}
- destination: platform=macOS,arch=x86_64
- sdk: macosx
- xcode_path: '/Applications/Xcode_14.3.app'
- cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
- derived_data_path: ${{ github.workspace }}/Build
- disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
- test_without_building: ${{ steps.restore-build.outputs.cache-hit }}
- other_flags: ${{ inputs.other_flags }}
- - name: Retry macOS Test Suite if needed
- if: inputs.retry_on_error == true && steps.run-tests.outcome=='failure'
- id: retry-tests
- uses: ./.github/composite_actions/run_xcodebuild_test
- with:
- scheme: ${{ env.SCHEME }}
- destination: platform=macOS,arch=x86_64
- sdk: macosx
- xcode_path: '/Applications/Xcode_14.3.app'
- cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
- derived_data_path: ${{ github.workspace }}/Build
- disable_package_resolution: true
- # Only test without building when this exact SHA was cached or we did not restore the build from main.
- test_without_building: ${{ steps.restore-build.outputs.cache-hit || !steps.restore-main-build.outputs.cache-hit }}
- other_flags: ${{ inputs.other_flags }}
- - name: Save the SHA build cache for re-runs
- if: failure() && steps.retry-tests.outcome=='failure'
- uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-macOS-build-${{ github.sha }}
- - name: Delete the SHA build cache on re-run success
- if: steps.restore-build.outputs.cache-matched-key
- env:
- GH_TOKEN: ${{ github.token }}
- continue-on-error: true
- run: |
- gh cache delete ${{ steps.restore-build.outputs.cache-matched-key }}
- shell: bash
- - name: Delete the old build cache on main
- if: github.ref_name == 'main' && steps.restore-main-build.outputs.cache-hit
- env:
- GH_TOKEN: ${{ github.token }}
- continue-on-error: true
- run: |
- gh cache delete ${{ steps.restore-main-build.outputs.cache-primary-key }}
- shell: bash
- - name: Save the new build cache on main
- if: github.ref_name == 'main'
- uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ steps.restore-main-build.outputs.cache-primary-key }}
-
- test-tvOS:
- name: ${{ inputs.scheme }} tvOS Tests
- runs-on: macos-13
- timeout-minutes: ${{ inputs.timeout-minutes }}
- steps:
- - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
- with:
- persist-credentials: false
- - name: Attempt to restore dependencies cache
- id: cache-packages
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ~/Library/Developer/Xcode/DerivedData/Amplify
- key: amplify-packages-${{ hashFiles('Package.resolved') }}
- restore-keys: |
- amplify-packages-
- - name: Attempt to restore the build cache for this SHA
- id: restore-build
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-tvOS-build-${{ github.sha }}
- restore-keys: |
- ${{ env.SCHEME }}-tvOS-build-
- - name: Attempt to restore the build cache from main
- if: steps.restore-build.outputs.cache-hit != 'true'
- id: restore-main-build
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-tvOS-latest-build-main
- - name: Run tvOS Test Suite
- id: run-tests
- continue-on-error: ${{ env.RETRY_ON_ERROR == 'true' }}
- uses: ./.github/composite_actions/run_xcodebuild_test
- with:
- scheme: ${{ env.SCHEME }}
- destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=16.4
- sdk: appletvsimulator
- xcode_path: '/Applications/Xcode_14.3.app'
- cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
- derived_data_path: ${{ github.workspace }}/Build
- disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
- test_without_building: ${{ steps.restore-build.outputs.cache-hit }}
- other_flags: ${{ inputs.other_flags }}
- - name: Retry tvOS Test Suite if needed
- if: inputs.retry_on_error == true && steps.run-tests.outcome=='failure'
- id: retry-tests
- uses: ./.github/composite_actions/run_xcodebuild_test
- with:
- scheme: ${{ env.SCHEME }}
- destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=16.4
- sdk: appletvsimulator
- xcode_path: '/Applications/Xcode_14.3.app'
- cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
- derived_data_path: ${{ github.workspace }}/Build
- disable_package_resolution: true
- # Only test without building when this exact SHA was cached or we did not restore the build from main.
- test_without_building: ${{ steps.restore-build.outputs.cache-hit || !steps.restore-main-build.outputs.cache-hit }}
- other_flags: ${{ inputs.other_flags }}
- - name: Save the SHA build cache for re-runs
- if: failure() && steps.retry-tests.outcome=='failure'
- uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-tvOS-build-${{ github.sha }}
- - name: Delete the SHA build cache on re-run success
- if: steps.restore-build.outputs.cache-matched-key
- env:
- GH_TOKEN: ${{ github.token }}
- continue-on-error: true
- run: |
- gh cache delete ${{ steps.restore-build.outputs.cache-matched-key }}
- shell: bash
- - name: Delete the old build cache on main
- if: github.ref_name == 'main' && steps.restore-main-build.outputs.cache-hit
- env:
- GH_TOKEN: ${{ github.token }}
- continue-on-error: true
- run: |
- gh cache delete ${{ steps.restore-main-build.outputs.cache-primary-key }}
- shell: bash
- - name: Save the new build cache on main
- if: github.ref_name == 'main'
- uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ steps.restore-main-build.outputs.cache-primary-key }}
-
- test-watchOS:
- name: ${{ inputs.scheme }} watchOS Tests
- runs-on: macos-13
- timeout-minutes: ${{ inputs.timeout-minutes }}
- steps:
- - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
- with:
- persist-credentials: false
- - name: Attempt to restore dependencies cache
- id: cache-packages
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ~/Library/Developer/Xcode/DerivedData/Amplify
- key: amplify-packages-${{ hashFiles('Package.resolved') }}
- restore-keys: |
- amplify-packages-
- - name: Attempt to restore the build cache for this SHA
- id: restore-build
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-watchOS-build-${{ github.sha }}
- restore-keys: |
- ${{ env.SCHEME }}-watchOS-build-
- - name: Attempt to restore the build cache from main
- if: steps.restore-build.outputs.cache-hit != 'true'
- id: restore-main-build
- timeout-minutes: 4
- continue-on-error: true
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-watchOS-latest-build-main
- - name: Run watchOS Test Suite
- id: run-tests
- continue-on-error: ${{ env.RETRY_ON_ERROR == 'true' }}
- uses: ./.github/composite_actions/run_xcodebuild_test
- with:
- scheme: ${{ env.SCHEME }}
- destination: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.4
- sdk: watchsimulator
- xcode_path: '/Applications/Xcode_14.3.app'
- cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
- derived_data_path: ${{ github.workspace }}/Build
- disable_package_resolution: ${{ steps.cache-packages.outputs.cache-hit }}
- test_without_building: ${{ steps.restore-build.outputs.cache-hit }}
- other_flags: ${{ inputs.other_flags }}
- - name: Retry watchOS Test Suite if needed
- if: inputs.retry_on_error == true && steps.run-tests.outcome=='failure'
- id: retry-tests
- uses: ./.github/composite_actions/run_xcodebuild_test
- with:
- scheme: ${{ env.SCHEME }}
- destination: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.4
- sdk: watchsimulator
- xcode_path: '/Applications/Xcode_14.3.app'
- cloned_source_packages_path: ~/Library/Developer/Xcode/DerivedData/Amplify
- derived_data_path: ${{ github.workspace }}/Build
- disable_package_resolution: true
- # Only test without building when this exact SHA was cached or we did not restore the build from main.
- test_without_building: ${{ steps.restore-build.outputs.cache-hit || !steps.restore-main-build.outputs.cache-hit }}
- other_flags: ${{ inputs.other_flags }}
- - name: Save the SHA build cache for re-runs
- if: failure() && steps.retry-tests.outcome=='failure'
- uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ env.SCHEME }}-watchOS-build-${{ github.sha }}
- - name: Delete the SHA build cache on re-run success
- if: steps.restore-build.outputs.cache-matched-key
- env:
- GH_TOKEN: ${{ github.token }}
- continue-on-error: true
- run: |
- gh cache delete ${{ steps.restore-build.outputs.cache-matched-key }}
- shell: bash
- - name: Delete the old build cache on main
- if: github.ref_name == 'main' && steps.restore-main-build.outputs.cache-hit
- env:
- GH_TOKEN: ${{ github.token }}
- continue-on-error: true
- run: |
- gh cache delete ${{ steps.restore-main-build.outputs.cache-primary-key }}
- shell: bash
- - name: Save the new build cache on main
- if: github.ref_name == 'main'
- uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
- with:
- path: ${{ github.workspace }}/Build
- key: ${{ steps.restore-main-build.outputs.cache-primary-key }}
diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml
index d329901675..7873f7b5d8 100644
--- a/.github/workflows/unit_test.yml
+++ b/.github/workflows/unit_test.yml
@@ -7,6 +7,27 @@ on:
type: string
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
push:
branches-ignore:
- main
@@ -14,7 +35,6 @@ on:
permissions:
contents: read
- actions: write
concurrency:
group: ${{ inputs.identifier || github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -29,7 +49,7 @@ jobs:
scheme: [
InternalAWSPinpointUnitTests
]
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: ${{ matrix.scheme }}
generate_coverage_report: false
@@ -53,13 +73,13 @@ jobs:
AWSS3StoragePlugin,
CoreMLPredictionsPlugin
]
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: ${{ matrix.scheme }}
generate_coverage_report: true
report-coverage:
- name: ${{ matrix.file.scheme }} Coverage Report
+ name: ${{ matrix.file.scheme }} Unit Tests
needs: [unit-tests-with-coverage]
strategy:
fail-fast: false
diff --git a/.github/workflows/unit_test_amplify.yml b/.github/workflows/unit_test_amplify.yml
index 9003e6fcf1..fd6189cdd8 100644
--- a/.github/workflows/unit_test_amplify.yml
+++ b/.github/workflows/unit_test_amplify.yml
@@ -1,12 +1,33 @@
name: Unit Tests | Amplify
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
amplify-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: Amplify
diff --git a/.github/workflows/unit_test_analytics.yml b/.github/workflows/unit_test_analytics.yml
index bd2c7e45a9..94108b08c4 100644
--- a/.github/workflows/unit_test_analytics.yml
+++ b/.github/workflows/unit_test_analytics.yml
@@ -1,12 +1,33 @@
name: Unit Tests | Analytics
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
analytics-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: AWSPinpointAnalyticsPlugin
diff --git a/.github/workflows/unit_test_api.yml b/.github/workflows/unit_test_api.yml
index b62bb2f030..75a135c36c 100644
--- a/.github/workflows/unit_test_api.yml
+++ b/.github/workflows/unit_test_api.yml
@@ -1,12 +1,33 @@
name: Unit Tests | API
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
api-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: AWSAPIPlugin
diff --git a/.github/workflows/unit_test_auth.yml b/.github/workflows/unit_test_auth.yml
index 67148635b3..f1c6e982b8 100644
--- a/.github/workflows/unit_test_auth.yml
+++ b/.github/workflows/unit_test_auth.yml
@@ -1,12 +1,33 @@
name: Unit Tests | Auth
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
auth-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: AWSCognitoAuthPlugin
diff --git a/.github/workflows/unit_test_core.yml b/.github/workflows/unit_test_core.yml
index 271087d9ce..252c28b5e0 100644
--- a/.github/workflows/unit_test_core.yml
+++ b/.github/workflows/unit_test_core.yml
@@ -1,12 +1,33 @@
name: Unit Tests | Core
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
core-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: AWSPluginsCore
diff --git a/.github/workflows/unit_test_datastore.yml b/.github/workflows/unit_test_datastore.yml
index 95c4e5a036..43e31f643c 100644
--- a/.github/workflows/unit_test_datastore.yml
+++ b/.github/workflows/unit_test_datastore.yml
@@ -1,12 +1,33 @@
name: Unit Tests | DataStore
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
datastore-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: AWSDataStorePlugin
diff --git a/.github/workflows/unit_test_geo.yml b/.github/workflows/unit_test_geo.yml
index 4a78110b87..137deacd3d 100644
--- a/.github/workflows/unit_test_geo.yml
+++ b/.github/workflows/unit_test_geo.yml
@@ -1,12 +1,33 @@
name: Unit Tests | Geo
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
geo-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: AWSLocationGeoPlugin
diff --git a/.github/workflows/unit_test_internal_pinpoint.yml b/.github/workflows/unit_test_internal_pinpoint.yml
index 413c7f8fa3..33aff6b2aa 100644
--- a/.github/workflows/unit_test_internal_pinpoint.yml
+++ b/.github/workflows/unit_test_internal_pinpoint.yml
@@ -1,12 +1,33 @@
name: Unit Tests | Internal Pinpoint
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
internal-pinpoint-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: InternalAWSPinpointUnitTests
diff --git a/.github/workflows/unit_test_logging.yml b/.github/workflows/unit_test_logging.yml
index 23697a599f..8da0b1fd8d 100644
--- a/.github/workflows/unit_test_logging.yml
+++ b/.github/workflows/unit_test_logging.yml
@@ -1,12 +1,33 @@
name: Unit Tests | Logging
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
logging-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: AWSCloudWatchLoggingPlugin
diff --git a/.github/workflows/unit_test_predictions.yml b/.github/workflows/unit_test_predictions.yml
index 0ea128a720..3d382e65a3 100644
--- a/.github/workflows/unit_test_predictions.yml
+++ b/.github/workflows/unit_test_predictions.yml
@@ -1,17 +1,38 @@
name: Unit Tests | Predictions
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
predictions-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: AWSPredictionsPlugin
coreml-predictions-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: CoreMLPredictionsPlugin
diff --git a/.github/workflows/unit_test_push_notifications.yml b/.github/workflows/unit_test_push_notifications.yml
index 4e6e26469b..c78bf7f88a 100644
--- a/.github/workflows/unit_test_push_notifications.yml
+++ b/.github/workflows/unit_test_push_notifications.yml
@@ -1,12 +1,33 @@
name: Unit Tests | Push Notifications
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
push-notifications-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: AWSPinpointPushNotificationsPlugin
diff --git a/.github/workflows/unit_test_storage.yml b/.github/workflows/unit_test_storage.yml
index d17439e906..21ce464d6e 100644
--- a/.github/workflows/unit_test_storage.yml
+++ b/.github/workflows/unit_test_storage.yml
@@ -1,12 +1,33 @@
name: Unit Tests | Storage
on:
workflow_dispatch:
+ inputs:
+ ios:
+ description: '📱 iOS'
+ required: true
+ default: true
+ type: boolean
+ macos:
+ description: '💻 macOS'
+ required: true
+ default: true
+ type: boolean
+ tvos:
+ description: '📺 tvOS'
+ required: true
+ default: true
+ type: boolean
+ watchos:
+ description: '⌚️ watchOS'
+ required: true
+ default: true
+ type: boolean
permissions:
contents: read
jobs:
storage-unit-tests:
- uses: ./.github/workflows/run_xcodebuild_test_platforms.yml
+ uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
scheme: AWSS3StoragePlugin
diff --git a/.github/workflows/upload_coverage_report.yml b/.github/workflows/upload_coverage_report.yml
index 29a76f6720..287e9fc154 100644
--- a/.github/workflows/upload_coverage_report.yml
+++ b/.github/workflows/upload_coverage_report.yml
@@ -17,7 +17,7 @@ permissions:
jobs:
upload-coverage:
- name: ${{ inputs.scheme }} Coverage Report
+ name: Upload Coverage | ${{ inputs.scheme }}
timeout-minutes: 2
runs-on: ubuntu-latest
steps:
diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Package.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Package.xcscheme
index 0da3673ffa..6970be959c 100644
--- a/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Package.xcscheme
+++ b/.swiftpm/xcode/xcshareddata/xcschemes/Amplify-Package.xcscheme
@@ -9,8 +9,8 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -597,16 +653,6 @@
ReferencedContainer = "container:">
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignIn/SRPAuth/VerifyPasswordSRP.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignIn/SRPAuth/VerifyPasswordSRP.swift
index 969b2b1c93..8327dbd659 100644
--- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignIn/SRPAuth/VerifyPasswordSRP.swift
+++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Actions/SignIn/SRPAuth/VerifyPasswordSRP.swift
@@ -13,11 +13,11 @@ struct VerifyPasswordSRP: Action {
let identifier = "VerifyPasswordSRP"
let stateData: SRPStateData
- let authResponse: InitiateAuthOutputResponse
+ let authResponse: InitiateAuthOutput
let clientMetadata: ClientMetadata
init(stateData: SRPStateData,
- authResponse: InitiateAuthOutputResponse,
+ authResponse: InitiateAuthOutput,
clientMetadata: ClientMetadata) {
self.stateData = stateData
self.authResponse = authResponse
diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoIdentityBehavior.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoIdentityBehavior.swift
index 9403bda5a6..b8e62c896a 100644
--- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoIdentityBehavior.swift
+++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoIdentityBehavior.swift
@@ -13,7 +13,7 @@ protocol CognitoIdentityBehavior {
/// Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.
/// This is a public API. You do not need any credentials to call this API.
/// Throws GetIdOutputError
- func getId(input: GetIdInput) async throws -> GetIdOutputResponse
+ func getId(input: GetIdInput) async throws -> GetIdOutput
/// Returns credentials for the provided identity ID.
/// Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com,
@@ -21,6 +21,6 @@ protocol CognitoIdentityBehavior {
/// This is a public API. You do not need any credentials to call this API.
/// Throws GetCredentialsForIdentityOutputError
func getCredentialsForIdentity(
- input: GetCredentialsForIdentityInput) async throws -> GetCredentialsForIdentityOutputResponse
+ input: GetCredentialsForIdentityInput) async throws -> GetCredentialsForIdentityOutput
}
diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoUserPoolBehavior.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoUserPoolBehavior.swift
index a38b7302f3..9a9b38b049 100644
--- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoUserPoolBehavior.swift
+++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/CognitoUserPoolBehavior.swift
@@ -11,82 +11,82 @@ import ClientRuntime
protocol CognitoUserPoolBehavior {
/// Throws InitiateAuthOutputError
- func initiateAuth(input: InitiateAuthInput) async throws -> InitiateAuthOutputResponse
+ func initiateAuth(input: InitiateAuthInput) async throws -> InitiateAuthOutput
/// Throws RespondToAuthChallengeOutputError
func respondToAuthChallenge(
- input: RespondToAuthChallengeInput) async throws -> RespondToAuthChallengeOutputResponse
+ input: RespondToAuthChallengeInput) async throws -> RespondToAuthChallengeOutput
/// Throws SignUpOutputError
- func signUp(input: SignUpInput) async throws -> SignUpOutputResponse
+ func signUp(input: SignUpInput) async throws -> SignUpOutput
/// Throws ConfirmSignUpOutputError
- func confirmSignUp(input: ConfirmSignUpInput) async throws -> ConfirmSignUpOutputResponse
+ func confirmSignUp(input: ConfirmSignUpInput) async throws -> ConfirmSignUpOutput
/// Throws GlobalSignOutOutputError
- func globalSignOut(input: GlobalSignOutInput) async throws -> GlobalSignOutOutputResponse
+ func globalSignOut(input: GlobalSignOutInput) async throws -> GlobalSignOutOutput
/// Throws RevokeTokenOutputError
- func revokeToken(input: RevokeTokenInput) async throws -> RevokeTokenOutputResponse
+ func revokeToken(input: RevokeTokenInput) async throws -> RevokeTokenOutput
// MARK: - User Attribute API's
/// Throws GetUserAttributeVerificationCodeOutputError
- func getUserAttributeVerificationCode(input: GetUserAttributeVerificationCodeInput) async throws -> GetUserAttributeVerificationCodeOutputResponse
+ func getUserAttributeVerificationCode(input: GetUserAttributeVerificationCodeInput) async throws -> GetUserAttributeVerificationCodeOutput
/// Throws GetUserOutputError
- func getUser(input: GetUserInput) async throws -> GetUserOutputResponse
+ func getUser(input: GetUserInput) async throws -> GetUserOutput
/// Throws UpdateUserAttributesOutputError
- func updateUserAttributes(input: UpdateUserAttributesInput) async throws -> UpdateUserAttributesOutputResponse
+ func updateUserAttributes(input: UpdateUserAttributesInput) async throws -> UpdateUserAttributesOutput
/// Verifies the specified user attributes in the user pool.
/// Throws VerifyUserAttributeOutputError
- func verifyUserAttribute(input: AWSCognitoIdentityProvider.VerifyUserAttributeInput) async throws -> AWSCognitoIdentityProvider.VerifyUserAttributeOutputResponse
+ func verifyUserAttribute(input: AWSCognitoIdentityProvider.VerifyUserAttributeInput) async throws -> AWSCognitoIdentityProvider.VerifyUserAttributeOutput
/// Changes the password for a specified user in a user pool.
/// Throws ChangePasswordOutputError
- func changePassword(input: ChangePasswordInput) async throws -> ChangePasswordOutputResponse
+ func changePassword(input: ChangePasswordInput) async throws -> ChangePasswordOutput
/// Delete the signed in user from the user pool.
/// Throws DeleteUserOutputError
- func deleteUser(input: DeleteUserInput) async throws -> DeleteUserOutputResponse
+ func deleteUser(input: DeleteUserInput) async throws -> DeleteUserOutput
/// Resends sign up code
/// Throws ResendConfirmationCodeOutputError
- func resendConfirmationCode(input: ResendConfirmationCodeInput) async throws -> ResendConfirmationCodeOutputResponse
+ func resendConfirmationCode(input: ResendConfirmationCodeInput) async throws -> ResendConfirmationCodeOutput
/// Resets password
/// Throws ForgotPasswordOutputError
- func forgotPassword(input: ForgotPasswordInput) async throws -> ForgotPasswordOutputResponse
+ func forgotPassword(input: ForgotPasswordInput) async throws -> ForgotPasswordOutput
/// Confirm Reset password
/// Throws ConfirmForgotPasswordOutputError
- func confirmForgotPassword(input: ConfirmForgotPasswordInput) async throws -> ConfirmForgotPasswordOutputResponse
+ func confirmForgotPassword(input: ConfirmForgotPasswordInput) async throws -> ConfirmForgotPasswordOutput
/// Lists the devices
- func listDevices(input: ListDevicesInput) async throws -> ListDevicesOutputResponse
+ func listDevices(input: ListDevicesInput) async throws -> ListDevicesOutput
/// Updates the device status
- func updateDeviceStatus(input: UpdateDeviceStatusInput) async throws -> UpdateDeviceStatusOutputResponse
+ func updateDeviceStatus(input: UpdateDeviceStatusInput) async throws -> UpdateDeviceStatusOutput
/// Forgets the specified device.
- func forgetDevice(input: ForgetDeviceInput) async throws -> ForgetDeviceOutputResponse
+ func forgetDevice(input: ForgetDeviceInput) async throws -> ForgetDeviceOutput
/// Confirms tracking of the device. This API call is the call that begins device tracking.
/// Throws ConfirmDeviceOutputError
- func confirmDevice(input: ConfirmDeviceInput) async throws -> ConfirmDeviceOutputResponse
+ func confirmDevice(input: ConfirmDeviceInput) async throws -> ConfirmDeviceOutput
/// Creates a new request to associate a new software token for the user
/// Throws AssociateSoftwareTokenOutputError
- func associateSoftwareToken(input: AssociateSoftwareTokenInput) async throws -> AssociateSoftwareTokenOutputResponse
+ func associateSoftwareToken(input: AssociateSoftwareTokenInput) async throws -> AssociateSoftwareTokenOutput
/// Register a user's entered time-based one-time password (TOTP) code and mark the user's software token MFA status as "verified" if successful.
/// Throws VerifySoftwareTokenOutputError
- func verifySoftwareToken(input: VerifySoftwareTokenInput) async throws -> VerifySoftwareTokenOutputResponse
+ func verifySoftwareToken(input: VerifySoftwareTokenInput) async throws -> VerifySoftwareTokenOutput
/// Set the user's multi-factor authentication (MFA) method preference, including which MFA factors are activated and if any are preferred.
/// Throws SetUserMFAPreferenceOutputError
- func setUserMFAPreference(input: SetUserMFAPreferenceInput) async throws -> SetUserMFAPreferenceOutputResponse
+ func setUserMFAPreference(input: SetUserMFAPreferenceInput) async throws -> SetUserMFAPreferenceOutput
}
diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/Helpers/SignInResponseBehavior.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/Helpers/SignInResponseBehavior.swift
index 3e682178e4..5e397ba94f 100644
--- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/Helpers/SignInResponseBehavior.swift
+++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/Helpers/SignInResponseBehavior.swift
@@ -20,6 +20,6 @@ protocol SignInResponseBehavior {
var session: Swift.String? { get }
}
-extension RespondToAuthChallengeOutputResponse: SignInResponseBehavior { }
+extension RespondToAuthChallengeOutput: SignInResponseBehavior { }
-extension InitiateAuthOutputResponse: SignInResponseBehavior { }
+extension InitiateAuthOutput: SignInResponseBehavior { }
diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/Helpers/SignUpOutputResponse+Helper.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/Helpers/SignUpOutputResponse+Helper.swift
index c6c4742008..df971aef31 100644
--- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/Helpers/SignUpOutputResponse+Helper.swift
+++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/Service/Helpers/SignUpOutputResponse+Helper.swift
@@ -9,7 +9,7 @@ import Amplify
import Foundation
import AWSCognitoIdentityProvider
-extension SignUpOutputResponse {
+extension SignUpOutput {
var authResponse: AuthSignUpResult {
if self.userConfirmed {
diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/CodeGen/Events/SignInEvent.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/CodeGen/Events/SignInEvent.swift
index 78ef7dfdc5..6733421a1f 100644
--- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/CodeGen/Events/SignInEvent.swift
+++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/StateMachine/CodeGen/Events/SignInEvent.swift
@@ -28,9 +28,9 @@ struct SignInEvent: StateMachineEvent {
case initiateMigrateAuth(SignInEventData, DeviceMetadata)
- case respondPasswordVerifier(SRPStateData, InitiateAuthOutputResponse, ClientMetadata)
+ case respondPasswordVerifier(SRPStateData, InitiateAuthOutput, ClientMetadata)
- case retryRespondPasswordVerifier(SRPStateData, InitiateAuthOutputResponse, ClientMetadata)
+ case retryRespondPasswordVerifier(SRPStateData, InitiateAuthOutput, ClientMetadata)
case initiateDeviceSRP(Username, SignInResponseBehavior)
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchAWSCredentials/FetchAuthAWSCredentialsTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchAWSCredentials/FetchAuthAWSCredentialsTests.swift
index fa4e75a9ce..bb05912e17 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchAWSCredentials/FetchAuthAWSCredentialsTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchAWSCredentials/FetchAuthAWSCredentialsTests.swift
@@ -42,7 +42,7 @@ class FetchAuthAWSCredentialsTests: XCTestCase {
let expectation = expectation(description: "fetchAWSCredentials")
let identityProviderFactory: BasicAuthorizationEnvironment.CognitoIdentityFactory = {
MockIdentity(mockGetCredentialsResponse: { _ in
- return GetCredentialsForIdentityOutputResponse()
+ return GetCredentialsForIdentityOutput()
})
}
let authorizationEnvironment = BasicAuthorizationEnvironment(
@@ -75,7 +75,7 @@ class FetchAuthAWSCredentialsTests: XCTestCase {
let expectation = expectation(description: "fetchAWSCredentials")
let identityProviderFactory: BasicAuthorizationEnvironment.CognitoIdentityFactory = {
MockIdentity(mockGetCredentialsResponse: { _ in
- return GetCredentialsForIdentityOutputResponse(identityId: "identityId")
+ return GetCredentialsForIdentityOutput(identityId: "identityId")
})
}
let authorizationEnvironment = BasicAuthorizationEnvironment(
@@ -117,7 +117,7 @@ class FetchAuthAWSCredentialsTests: XCTestCase {
let identityProviderFactory: BasicAuthorizationEnvironment.CognitoIdentityFactory = {
MockIdentity(mockGetCredentialsResponse: { _ in
- return GetCredentialsForIdentityOutputResponse(
+ return GetCredentialsForIdentityOutput(
credentials: CognitoIdentityClientTypes.Credentials(
accessKeyId: expectedAccessKey,
expiration: Date(),
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshHostedUITokensTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshHostedUITokensTests.swift
index 2b94f7721f..2bc60245eb 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshHostedUITokensTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshHostedUITokensTests.swift
@@ -279,7 +279,7 @@ class RefreshHostedUITokensTests: XCTestCase {
private func identityProviderFactory() throws -> CognitoUserPoolBehavior {
return MockIdentityProvider(
mockInitiateAuthResponse: { _ in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .init(
accessToken: "accessTokenNew",
expiresIn: 100,
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshUserPoolTokensTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshUserPoolTokensTests.swift
index ad029fbf67..1dbc164dff 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshUserPoolTokensTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/FetchAuthSession/FetchUserPoolTokens/RefreshUserPoolTokensTests.swift
@@ -46,7 +46,7 @@ class RefreshUserPoolTokensTests: XCTestCase {
let identityProviderFactory: BasicSRPAuthEnvironment.CognitoUserPoolFactory = {
MockIdentityProvider(
mockInitiateAuthResponse: { _ in
- return InitiateAuthOutputResponse()
+ return InitiateAuthOutput()
}
)
}
@@ -78,7 +78,7 @@ class RefreshUserPoolTokensTests: XCTestCase {
let identityProviderFactory: BasicSRPAuthEnvironment.CognitoUserPoolFactory = {
MockIdentityProvider(
mockInitiateAuthResponse: { _ in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .init(
accessToken: "accessTokenNew",
expiresIn: 100,
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/InitiateAuthSRPTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/InitiateAuthSRPTests.swift
index 9ce542f0a2..c3ef575d95 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/InitiateAuthSRPTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/InitiateAuthSRPTests.swift
@@ -18,7 +18,7 @@ class InitiateAuthSRPTests: XCTestCase {
MockIdentityProvider(
mockInitiateAuthResponse: { _ in
initiateAuthInvoked.fulfill()
- return InitiateAuthOutputResponse()
+ return InitiateAuthOutput()
}
)
}
@@ -83,7 +83,7 @@ class InitiateAuthSRPTests: XCTestCase {
let identityProviderFactory: BasicSRPAuthEnvironment.CognitoUserPoolFactory = {
MockIdentityProvider(
mockInitiateAuthResponse: { _ in
- return InitiateAuthOutputResponse()
+ return InitiateAuthOutput()
}
)
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyDevicePasswordSRPSignatureTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyDevicePasswordSRPSignatureTests.swift
index 53afd8af8f..acc686e5dc 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyDevicePasswordSRPSignatureTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyDevicePasswordSRPSignatureTests.swift
@@ -111,7 +111,7 @@ class VerifyDevicePasswordSRPSignatureTests: XCTestCase {
private func signature() throws -> String {
let action = VerifyDevicePasswordSRP(
stateData: .testData,
- authResponse: InitiateAuthOutputResponse.validTestData
+ authResponse: InitiateAuthOutput.validTestData
)
return try action.signature(
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyPasswordSRPTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyPasswordSRPTests.swift
index e6a8e599bb..7628638339 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyPasswordSRPTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/InitiateAuthSRP/VerifyPasswordSRPTests.swift
@@ -31,14 +31,14 @@ class VerifyPasswordSRPTests: XCTestCase {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
verifyPasswordInvoked.fulfill()
- return RespondToAuthChallengeOutputResponse()
+ return RespondToAuthChallengeOutput()
})
}
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.validTestData
+ let data = InitiateAuthOutput.validTestData
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
@@ -67,14 +67,14 @@ class VerifyPasswordSRPTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse()
+ return RespondToAuthChallengeOutput()
})
}
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.validTestData
+ let data = InitiateAuthOutput.validTestData
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
@@ -118,14 +118,14 @@ class VerifyPasswordSRPTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse()
+ return RespondToAuthChallengeOutput()
})
}
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.invalidChallenge
+ let data = InitiateAuthOutput.invalidChallenge
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
@@ -169,14 +169,14 @@ class VerifyPasswordSRPTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse()
+ return RespondToAuthChallengeOutput()
})
}
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.invalidTestDataWithNoSalt
+ let data = InitiateAuthOutput.invalidTestDataWithNoSalt
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
@@ -220,14 +220,14 @@ class VerifyPasswordSRPTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse()
+ return RespondToAuthChallengeOutput()
})
}
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.invalidTestDataWithNoSecretBlock
+ let data = InitiateAuthOutput.invalidTestDataWithNoSecretBlock
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
@@ -271,14 +271,14 @@ class VerifyPasswordSRPTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse()
+ return RespondToAuthChallengeOutput()
})
}
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.invalidTestDataWithNoSRPB
+ let data = InitiateAuthOutput.invalidTestDataWithNoSRPB
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
@@ -322,14 +322,14 @@ class VerifyPasswordSRPTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse()
+ return RespondToAuthChallengeOutput()
})
}
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.invalidTestDataForException
+ let data = InitiateAuthOutput.invalidTestDataForException
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
@@ -372,14 +372,14 @@ class VerifyPasswordSRPTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse.testData()
+ return RespondToAuthChallengeOutput.testData()
})
}
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.validTestData
+ let data = InitiateAuthOutput.validTestData
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
@@ -432,7 +432,7 @@ class VerifyPasswordSRPTests: XCTestCase {
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.validTestData
+ let data = InitiateAuthOutput.validTestData
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
@@ -483,7 +483,7 @@ class VerifyPasswordSRPTests: XCTestCase {
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.validTestData
+ let data = InitiateAuthOutput.validTestData
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
@@ -524,14 +524,14 @@ class VerifyPasswordSRPTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse.testDataWithNewDevice()
+ return RespondToAuthChallengeOutput.testDataWithNewDevice()
})
}
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.validTestData
+ let data = InitiateAuthOutput.validTestData
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
@@ -570,14 +570,14 @@ class VerifyPasswordSRPTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse.testDataWithVerifyDevice()
+ return RespondToAuthChallengeOutput.testDataWithVerifyDevice()
})
}
let environment = Defaults.makeDefaultAuthEnvironment(
userPoolFactory: identityProviderFactory)
- let data = InitiateAuthOutputResponse.validTestData
+ let data = InitiateAuthOutput.validTestData
let action = VerifyPasswordSRP(stateData: SRPStateData.testData,
authResponse: data,
clientMetadata: [:])
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/RevokeTokenTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/RevokeTokenTests.swift
index 31bf393a06..f69a2e7fec 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/RevokeTokenTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/RevokeTokenTests.swift
@@ -18,7 +18,7 @@ class RevokeTokenTests: XCTestCase {
MockIdentityProvider(
mockRevokeTokenResponse: { _ in
revokeTokenInvoked.fulfill()
- return try await RevokeTokenOutputResponse(httpResponse: MockHttpResponse.ok)
+ return try await RevokeTokenOutput(httpResponse: MockHttpResponse.ok)
}
)
}
@@ -92,7 +92,7 @@ class RevokeTokenTests: XCTestCase {
let identityProviderFactory: BasicUserPoolEnvironment.CognitoUserPoolFactory = {
MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- return try await RevokeTokenOutputResponse(httpResponse: MockHttpResponse.ok)
+ return try await RevokeTokenOutput(httpResponse: MockHttpResponse.ok)
}
)
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/ShowHostedUISignOutTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/ShowHostedUISignOutTests.swift
index 0751703550..e00f5a4b3e 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/ShowHostedUISignOutTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/ShowHostedUISignOutTests.swift
@@ -379,7 +379,7 @@ class ShowHostedUISignOutTests: XCTestCase {
private func identityProviderFactory() throws -> CognitoUserPoolBehavior {
return MockIdentityProvider(
mockInitiateAuthResponse: { _ in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .init(
accessToken: "accessTokenNew",
expiresIn: 100,
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/SignOutGloballyTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/SignOutGloballyTests.swift
index 03d00fae34..44f7f866d0 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/SignOutGloballyTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/SignOut/SignOutGloballyTests.swift
@@ -18,7 +18,7 @@ class SignOutGloballyTests: XCTestCase {
MockIdentityProvider(
mockGlobalSignOutResponse: { _ in
globalSignOutInvoked.fulfill()
- return try await GlobalSignOutOutputResponse(httpResponse: MockHttpResponse.ok)
+ return try await GlobalSignOutOutput(httpResponse: MockHttpResponse.ok)
}
)
}
@@ -88,7 +88,7 @@ class SignOutGloballyTests: XCTestCase {
let identityProviderFactory: BasicUserPoolEnvironment.CognitoUserPoolFactory = {
MockIdentityProvider(
mockGlobalSignOutResponse: { _ in
- return try await GlobalSignOutOutputResponse(httpResponse: MockHttpResponse.ok)
+ return try await GlobalSignOutOutput(httpResponse: MockHttpResponse.ok)
}
)
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/VerifySignInChallenge/VerifySignInChallengeTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/VerifySignInChallenge/VerifySignInChallengeTests.swift
index f421ac3f57..9937d86b74 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/VerifySignInChallenge/VerifySignInChallengeTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/VerifySignInChallenge/VerifySignInChallengeTests.swift
@@ -41,7 +41,7 @@ class VerifySignInChallengeTests: XCTestCase {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
verifyPasswordInvoked.fulfill()
- return RespondToAuthChallengeOutputResponse()
+ return RespondToAuthChallengeOutput()
})
}
@@ -75,7 +75,7 @@ class VerifySignInChallengeTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse()
+ return RespondToAuthChallengeOutput()
})
}
@@ -124,7 +124,7 @@ class VerifySignInChallengeTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse.testData()
+ return RespondToAuthChallengeOutput.testData()
})
}
@@ -270,7 +270,7 @@ class VerifySignInChallengeTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse.testDataWithNewDevice()
+ return RespondToAuthChallengeOutput.testDataWithNewDevice()
})
}
@@ -314,7 +314,7 @@ class VerifySignInChallengeTests: XCTestCase {
let identityProviderFactory: CognitoFactory = {
MockIdentityProvider(
mockRespondToAuthChallengeResponse: { _ in
- return RespondToAuthChallengeOutputResponse.testDataWithVerifyDevice()
+ return RespondToAuthChallengeOutput.testDataWithVerifyDevice()
})
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ConfigurationTests/ClientSecretConfigurationTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ConfigurationTests/ClientSecretConfigurationTests.swift
index 2c63eced5e..1a3cdea3c7 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ConfigurationTests/ClientSecretConfigurationTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ConfigurationTests/ClientSecretConfigurationTests.swift
@@ -84,9 +84,9 @@ class ClientSecretConfigurationTests: XCTestCase {
destination: "Amplify@amazon.com"
)
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { request in
+ mockForgotPasswordOutput: { request in
XCTAssertNotNil(request.secretHash)
- return ForgotPasswordOutputResponse(codeDeliveryDetails: codeDeliveryDetails)
+ return ForgotPasswordOutput(codeDeliveryDetails: codeDeliveryDetails)
}
)
_ = try await plugin.resetPassword(for: "user", options: nil)
@@ -102,9 +102,9 @@ class ClientSecretConfigurationTests: XCTestCase {
///
func testClientSecretWithConfirmResetPassword() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { request in
+ mockConfirmForgotPasswordOutput: { request in
XCTAssertNotNil(request.secretHash)
- return try await ConfirmForgotPasswordOutputResponse(httpResponse: MockHttpResponse.ok)
+ return try await ConfirmForgotPasswordOutput(httpResponse: MockHttpResponse.ok)
}
)
try await plugin.confirmResetPassword(
@@ -131,9 +131,9 @@ class ClientSecretConfigurationTests: XCTestCase {
destination: nil
)
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { request in
+ mockResendConfirmationCodeOutput: { request in
XCTAssertNotNil(request.secretHash)
- return ResendConfirmationCodeOutputResponse(
+ return ResendConfirmationCodeOutput(
codeDeliveryDetails: codeDeliveryDetails
)
}
@@ -243,10 +243,10 @@ class ClientSecretConfigurationTests: XCTestCase {
return .testData
}, mockInitiateAuthResponse: { request in
XCTAssertNotNil(request.authParameters?["SECRET_HASH"])
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockGlobalSignOutResponse: { _ in
@@ -254,7 +254,7 @@ class ClientSecretConfigurationTests: XCTestCase {
}, mockRespondToAuthChallengeResponse: { request in
XCTAssertNotNil(request.challengeResponses?["SECRET_HASH"])
- return RespondToAuthChallengeOutputResponse(
+ return RespondToAuthChallengeOutput(
authenticationResult: .init(
accessToken: Defaults.validAccessToken,
expiresIn: 300,
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/HubEventTests/AuthHubEventHandlerTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/HubEventTests/AuthHubEventHandlerTests.swift
index 6618988f58..496e7d2331 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/HubEventTests/AuthHubEventHandlerTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/HubEventTests/AuthHubEventHandlerTests.swift
@@ -308,13 +308,13 @@ class AuthHubEventHandlerTests: XCTestCase {
private func configurePluginForSignInEvent() {
let mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .init(
accessToken: Defaults.validAccessToken,
expiresIn: 300,
@@ -358,12 +358,12 @@ class AuthHubEventHandlerTests: XCTestCase {
let mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
- try await DeleteUserOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ mockDeleteUserOutput: { _ in
+ try await DeleteUserOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}
)
@@ -380,10 +380,10 @@ class AuthHubEventHandlerTests: XCTestCase {
let mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}
)
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/GlobalSignOutOutputResponse+Mock.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/GlobalSignOutOutputResponse+Mock.swift
index 66f2e4a9f7..18affcafee 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/GlobalSignOutOutputResponse+Mock.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/GlobalSignOutOutputResponse+Mock.swift
@@ -8,9 +8,9 @@
import Foundation
import AWSCognitoIdentityProvider
-extension GlobalSignOutOutputResponse {
+extension GlobalSignOutOutput {
- static var testData: GlobalSignOutOutputResponse {
+ static var testData: GlobalSignOutOutput {
return .init()
}
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/RevokeTokenOutputResponse+Mock.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/RevokeTokenOutputResponse+Mock.swift
index 8779a86a67..81b5296c34 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/RevokeTokenOutputResponse+Mock.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Mocks/MockData/RevokeTokenOutputResponse+Mock.swift
@@ -8,9 +8,9 @@
import Foundation
import AWSCognitoIdentityProvider
-extension RevokeTokenOutputResponse {
+extension RevokeTokenOutput {
- static var testData: RevokeTokenOutputResponse {
+ static var testData: RevokeTokenOutput {
return .init()
}
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SRPSignInState/SRPTestData.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SRPSignInState/SRPTestData.swift
index b4f3ea5bdc..4ecd257a5d 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SRPSignInState/SRPTestData.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ResolverTests/SRPSignInState/SRPTestData.swift
@@ -23,52 +23,52 @@ extension SRPStateData {
)
}
-extension InitiateAuthOutputResponse {
- static let testData = InitiateAuthOutputResponse(
+extension InitiateAuthOutput {
+ static let testData = InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
challengeParameters: nil,
session: nil)
- static let validTestData = InitiateAuthOutputResponse(
+ static let validTestData = InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "session")
- static let invalidChallenge = InitiateAuthOutputResponse(
+ static let invalidChallenge = InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
challengeParameters: [:],
session: nil)
- static let invalidTestDataWithNoSalt = InitiateAuthOutputResponse(
+ static let invalidTestDataWithNoSalt = InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.invalidChalengeParamsNoSalt,
+ challengeParameters: InitiateAuthOutput.invalidChalengeParamsNoSalt,
session: "session")
- static let invalidTestDataWithNoSecretBlock = InitiateAuthOutputResponse(
+ static let invalidTestDataWithNoSecretBlock = InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.invalidChalengeParamsNoSecretBlock,
+ challengeParameters: InitiateAuthOutput.invalidChalengeParamsNoSecretBlock,
session: "session")
- static let invalidTestDataWithNoSRPB = InitiateAuthOutputResponse(
+ static let invalidTestDataWithNoSRPB = InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.invalidChalengeParamsNoSRPB,
+ challengeParameters: InitiateAuthOutput.invalidChalengeParamsNoSRPB,
session: "session")
- static let invalidTestDataForException = InitiateAuthOutputResponse(
+ static let invalidTestDataForException = InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.invalidChalengeParamsForException,
+ challengeParameters: InitiateAuthOutput.invalidChalengeParamsForException,
session: "session")
}
-extension RespondToAuthChallengeOutputResponse {
- static func testData() -> RespondToAuthChallengeOutputResponse {
+extension RespondToAuthChallengeOutput {
+ static func testData() -> RespondToAuthChallengeOutput {
let result = CognitoIdentityProviderClientTypes.AuthenticationResultType(
accessToken: Defaults.validAccessToken,
expiresIn: 3_600,
@@ -77,14 +77,14 @@ extension RespondToAuthChallengeOutputResponse {
refreshToken: "refreshTokenXXX",
tokenType: "Bearer")
- return RespondToAuthChallengeOutputResponse(
+ return RespondToAuthChallengeOutput(
authenticationResult: result,
challengeName: .none,
challengeParameters: [:],
session: "session")
}
- static func testDataWithNewDevice() -> RespondToAuthChallengeOutputResponse {
+ static func testDataWithNewDevice() -> RespondToAuthChallengeOutput {
let result = CognitoIdentityProviderClientTypes.AuthenticationResultType(
accessToken: Defaults.validAccessToken,
expiresIn: 3_600,
@@ -93,15 +93,15 @@ extension RespondToAuthChallengeOutputResponse {
refreshToken: "refreshTokenXXX",
tokenType: "Bearer")
- return RespondToAuthChallengeOutputResponse(
+ return RespondToAuthChallengeOutput(
authenticationResult: result,
challengeName: .none,
challengeParameters: [:],
session: "session")
}
- static func testDataWithVerifyDevice() -> RespondToAuthChallengeOutputResponse {
- return RespondToAuthChallengeOutputResponse(
+ static func testDataWithVerifyDevice() -> RespondToAuthChallengeOutput {
+ return RespondToAuthChallengeOutput(
authenticationResult: nil,
challengeName: .deviceSrpAuth,
challengeParameters: [:],
@@ -110,8 +110,8 @@ extension RespondToAuthChallengeOutputResponse {
static func testData(
challenge: CognitoIdentityProviderClientTypes.ChallengeNameType = .smsMfa,
- challengeParameters: [String: String] = [:]) -> RespondToAuthChallengeOutputResponse {
- return RespondToAuthChallengeOutputResponse(
+ challengeParameters: [String: String] = [:]) -> RespondToAuthChallengeOutput {
+ return RespondToAuthChallengeOutput(
authenticationResult: nil,
challengeName: challenge,
challengeParameters: challengeParameters,
@@ -153,7 +153,7 @@ extension SignInEvent {
static let respondPasswordVerifierEvent = SignInEvent(
id: "respondPasswordVerifierEvent",
- eventType: .respondPasswordVerifier(.testData, InitiateAuthOutputResponse.testData, [:])
+ eventType: .respondPasswordVerifier(.testData, InitiateAuthOutput.testData, [:])
)
static func finalizeSRPSignInEvent(signedInData: SignedInData) -> SignInEvent {
@@ -216,7 +216,7 @@ extension SRPStateData {
clientTimestamp: Date(timeIntervalSinceReferenceDate: 656_187_908.969623)
)
}
-extension InitiateAuthOutputResponse {
+extension InitiateAuthOutput {
static let invalidChalengeParamsNoSalt: [String: String] = [
"SALT": "",
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentity.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentity.swift
index ce3e740b8e..ed6d2a48e0 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentity.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentity.swift
@@ -11,10 +11,10 @@ import ClientRuntime
struct MockIdentity: CognitoIdentityBehavior {
- typealias MockGetIdResponse = (GetIdInput) async throws -> GetIdOutputResponse
+ typealias MockGetIdResponse = (GetIdInput) async throws -> GetIdOutput
typealias MockGetCredentialsResponse = (GetCredentialsForIdentityInput) async throws
- -> GetCredentialsForIdentityOutputResponse
+ -> GetCredentialsForIdentityOutput
let mockGetIdResponse: MockGetIdResponse?
let mockGetCredentialsResponse: MockGetCredentialsResponse?
@@ -25,11 +25,11 @@ struct MockIdentity: CognitoIdentityBehavior {
self.mockGetCredentialsResponse = mockGetCredentialsResponse
}
- func getId(input: GetIdInput) async throws -> GetIdOutputResponse {
+ func getId(input: GetIdInput) async throws -> GetIdOutput {
return try await mockGetIdResponse!(input)
}
- func getCredentialsForIdentity(input: GetCredentialsForIdentityInput) async throws -> GetCredentialsForIdentityOutputResponse {
+ func getCredentialsForIdentity(input: GetCredentialsForIdentityInput) async throws -> GetCredentialsForIdentityOutput {
return try await mockGetCredentialsResponse!(input)
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentityProvider.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentityProvider.swift
index ba6b25f2a9..5558466828 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentityProvider.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/Support/MockIdentityProvider.swift
@@ -12,70 +12,70 @@ import ClientRuntime
struct MockIdentityProvider: CognitoUserPoolBehavior {
typealias MockSignUpResponse = (SignUpInput) async throws
- -> SignUpOutputResponse
+ -> SignUpOutput
typealias MockRevokeTokenResponse = (RevokeTokenInput) async throws
- -> RevokeTokenOutputResponse
+ -> RevokeTokenOutput
typealias MockInitiateAuthResponse = (InitiateAuthInput) async throws
- -> InitiateAuthOutputResponse
+ -> InitiateAuthOutput
typealias MockConfirmSignUpResponse = (ConfirmSignUpInput) async throws
- -> ConfirmSignUpOutputResponse
+ -> ConfirmSignUpOutput
typealias MockGlobalSignOutResponse = (GlobalSignOutInput) async throws
- -> GlobalSignOutOutputResponse
+ -> GlobalSignOutOutput
typealias MockRespondToAuthChallengeResponse = (RespondToAuthChallengeInput) async throws
- -> RespondToAuthChallengeOutputResponse
+ -> RespondToAuthChallengeOutput
- typealias MockGetUserAttributeVerificationCodeOutputResponse = (GetUserAttributeVerificationCodeInput) async throws
- -> GetUserAttributeVerificationCodeOutputResponse
+ typealias MockGetUserAttributeVerificationCodeOutput = (GetUserAttributeVerificationCodeInput) async throws
+ -> GetUserAttributeVerificationCodeOutput
- typealias MockGetUserAttributesOutputResponse = (GetUserInput) async throws
- -> GetUserOutputResponse
+ typealias MockGetUserAttributesOutput = (GetUserInput) async throws
+ -> GetUserOutput
- typealias MockUpdateUserAttributesOutputResponse = (UpdateUserAttributesInput) async throws
- -> UpdateUserAttributesOutputResponse
+ typealias MockUpdateUserAttributesOutput = (UpdateUserAttributesInput) async throws
+ -> UpdateUserAttributesOutput
- typealias MockConfirmUserAttributeOutputResponse = (VerifyUserAttributeInput) async throws
- -> VerifyUserAttributeOutputResponse
+ typealias MockConfirmUserAttributeOutput = (VerifyUserAttributeInput) async throws
+ -> VerifyUserAttributeOutput
- typealias MockChangePasswordOutputResponse = (ChangePasswordInput) async throws
- -> ChangePasswordOutputResponse
+ typealias MockChangePasswordOutput = (ChangePasswordInput) async throws
+ -> ChangePasswordOutput
- typealias MockResendConfirmationCodeOutputResponse = (ResendConfirmationCodeInput) async throws
- -> ResendConfirmationCodeOutputResponse
+ typealias MockResendConfirmationCodeOutput = (ResendConfirmationCodeInput) async throws
+ -> ResendConfirmationCodeOutput
- typealias MockForgotPasswordOutputResponse = (ForgotPasswordInput) async throws
- -> ForgotPasswordOutputResponse
+ typealias MockForgotPasswordOutput = (ForgotPasswordInput) async throws
+ -> ForgotPasswordOutput
- typealias MockDeleteUserOutputResponse = (DeleteUserInput) async throws
- -> DeleteUserOutputResponse
+ typealias MockDeleteUserOutput = (DeleteUserInput) async throws
+ -> DeleteUserOutput
- typealias MockConfirmForgotPasswordOutputResponse = (ConfirmForgotPasswordInput) async throws
- -> ConfirmForgotPasswordOutputResponse
+ typealias MockConfirmForgotPasswordOutput = (ConfirmForgotPasswordInput) async throws
+ -> ConfirmForgotPasswordOutput
- typealias MockListDevicesOutputResponse = (ListDevicesInput) async throws
- -> ListDevicesOutputResponse
+ typealias MockListDevicesOutput = (ListDevicesInput) async throws
+ -> ListDevicesOutput
typealias MockRememberDeviceResponse = (UpdateDeviceStatusInput) async throws
- -> UpdateDeviceStatusOutputResponse
+ -> UpdateDeviceStatusOutput
typealias MockForgetDeviceResponse = (ForgetDeviceInput) async throws
- -> ForgetDeviceOutputResponse
+ -> ForgetDeviceOutput
typealias MockConfirmDeviceResponse = (ConfirmDeviceInput) async throws
- -> ConfirmDeviceOutputResponse
+ -> ConfirmDeviceOutput
typealias MockSetUserMFAPreferenceResponse = (SetUserMFAPreferenceInput) async throws
- -> SetUserMFAPreferenceOutputResponse
+ -> SetUserMFAPreferenceOutput
typealias MockAssociateSoftwareTokenResponse = (AssociateSoftwareTokenInput) async throws
- -> AssociateSoftwareTokenOutputResponse
+ -> AssociateSoftwareTokenOutput
typealias MockVerifySoftwareTokenResponse = (VerifySoftwareTokenInput) async throws
- -> VerifySoftwareTokenOutputResponse
+ -> VerifySoftwareTokenOutput
let mockSignUpResponse: MockSignUpResponse?
let mockRevokeTokenResponse: MockRevokeTokenResponse?
@@ -83,16 +83,16 @@ struct MockIdentityProvider: CognitoUserPoolBehavior {
let mockGlobalSignOutResponse: MockGlobalSignOutResponse?
let mockConfirmSignUpResponse: MockConfirmSignUpResponse?
let mockRespondToAuthChallengeResponse: MockRespondToAuthChallengeResponse?
- let mockGetUserAttributeVerificationCodeOutputResponse: MockGetUserAttributeVerificationCodeOutputResponse?
- let mockGetUserAttributeResponse: MockGetUserAttributesOutputResponse?
- let mockUpdateUserAttributeResponse: MockUpdateUserAttributesOutputResponse?
- let mockConfirmUserAttributeOutputResponse: MockConfirmUserAttributeOutputResponse?
- let mockChangePasswordOutputResponse: MockChangePasswordOutputResponse?
- let mockResendConfirmationCodeOutputResponse: MockResendConfirmationCodeOutputResponse?
- let mockDeleteUserOutputResponse: MockDeleteUserOutputResponse?
- let mockForgotPasswordOutputResponse: MockForgotPasswordOutputResponse?
- let mockConfirmForgotPasswordOutputResponse: MockConfirmForgotPasswordOutputResponse?
- let mockListDevicesOutputResponse: MockListDevicesOutputResponse?
+ let mockGetUserAttributeVerificationCodeOutput: MockGetUserAttributeVerificationCodeOutput?
+ let mockGetUserAttributeResponse: MockGetUserAttributesOutput?
+ let mockUpdateUserAttributeResponse: MockUpdateUserAttributesOutput?
+ let mockConfirmUserAttributeOutput: MockConfirmUserAttributeOutput?
+ let mockChangePasswordOutput: MockChangePasswordOutput?
+ let mockResendConfirmationCodeOutput: MockResendConfirmationCodeOutput?
+ let mockDeleteUserOutput: MockDeleteUserOutput?
+ let mockForgotPasswordOutput: MockForgotPasswordOutput?
+ let mockConfirmForgotPasswordOutput: MockConfirmForgotPasswordOutput?
+ let mockListDevicesOutput: MockListDevicesOutput?
let mockRememberDeviceResponse: MockRememberDeviceResponse?
let mockForgetDeviceResponse: MockForgetDeviceResponse?
let mockConfirmDeviceResponse: MockConfirmDeviceResponse?
@@ -107,16 +107,16 @@ struct MockIdentityProvider: CognitoUserPoolBehavior {
mockGlobalSignOutResponse: MockGlobalSignOutResponse? = nil,
mockConfirmSignUpResponse: MockConfirmSignUpResponse? = nil,
mockRespondToAuthChallengeResponse: MockRespondToAuthChallengeResponse? = nil,
- mockGetUserAttributeVerificationCodeOutputResponse: MockGetUserAttributeVerificationCodeOutputResponse? = nil,
- mockGetUserAttributeResponse: MockGetUserAttributesOutputResponse? = nil,
- mockUpdateUserAttributeResponse: MockUpdateUserAttributesOutputResponse? = nil,
- mockConfirmUserAttributeOutputResponse: MockConfirmUserAttributeOutputResponse? = nil,
- mockChangePasswordOutputResponse: MockChangePasswordOutputResponse? = nil,
- mockResendConfirmationCodeOutputResponse: MockResendConfirmationCodeOutputResponse? = nil,
- mockDeleteUserOutputResponse: MockDeleteUserOutputResponse? = nil,
- mockForgotPasswordOutputResponse: MockForgotPasswordOutputResponse? = nil,
- mockConfirmForgotPasswordOutputResponse: MockConfirmForgotPasswordOutputResponse? = nil,
- mockListDevicesOutputResponse: MockListDevicesOutputResponse? = nil,
+ mockGetUserAttributeVerificationCodeOutput: MockGetUserAttributeVerificationCodeOutput? = nil,
+ mockGetUserAttributeResponse: MockGetUserAttributesOutput? = nil,
+ mockUpdateUserAttributeResponse: MockUpdateUserAttributesOutput? = nil,
+ mockConfirmUserAttributeOutput: MockConfirmUserAttributeOutput? = nil,
+ mockChangePasswordOutput: MockChangePasswordOutput? = nil,
+ mockResendConfirmationCodeOutput: MockResendConfirmationCodeOutput? = nil,
+ mockDeleteUserOutput: MockDeleteUserOutput? = nil,
+ mockForgotPasswordOutput: MockForgotPasswordOutput? = nil,
+ mockConfirmForgotPasswordOutput: MockConfirmForgotPasswordOutput? = nil,
+ mockListDevicesOutput: MockListDevicesOutput? = nil,
mockRememberDeviceResponse: MockRememberDeviceResponse? = nil,
mockForgetDeviceResponse: MockForgetDeviceResponse? = nil,
mockConfirmDeviceResponse: MockConfirmDeviceResponse? = nil,
@@ -130,16 +130,16 @@ struct MockIdentityProvider: CognitoUserPoolBehavior {
self.mockGlobalSignOutResponse = mockGlobalSignOutResponse
self.mockConfirmSignUpResponse = mockConfirmSignUpResponse
self.mockRespondToAuthChallengeResponse = mockRespondToAuthChallengeResponse
- self.mockGetUserAttributeVerificationCodeOutputResponse = mockGetUserAttributeVerificationCodeOutputResponse
+ self.mockGetUserAttributeVerificationCodeOutput = mockGetUserAttributeVerificationCodeOutput
self.mockGetUserAttributeResponse = mockGetUserAttributeResponse
self.mockUpdateUserAttributeResponse = mockUpdateUserAttributeResponse
- self.mockConfirmUserAttributeOutputResponse = mockConfirmUserAttributeOutputResponse
- self.mockChangePasswordOutputResponse = mockChangePasswordOutputResponse
- self.mockResendConfirmationCodeOutputResponse = mockResendConfirmationCodeOutputResponse
- self.mockDeleteUserOutputResponse = mockDeleteUserOutputResponse
- self.mockForgotPasswordOutputResponse = mockForgotPasswordOutputResponse
- self.mockConfirmForgotPasswordOutputResponse = mockConfirmForgotPasswordOutputResponse
- self.mockListDevicesOutputResponse = mockListDevicesOutputResponse
+ self.mockConfirmUserAttributeOutput = mockConfirmUserAttributeOutput
+ self.mockChangePasswordOutput = mockChangePasswordOutput
+ self.mockResendConfirmationCodeOutput = mockResendConfirmationCodeOutput
+ self.mockDeleteUserOutput = mockDeleteUserOutput
+ self.mockForgotPasswordOutput = mockForgotPasswordOutput
+ self.mockConfirmForgotPasswordOutput = mockConfirmForgotPasswordOutput
+ self.mockListDevicesOutput = mockListDevicesOutput
self.mockRememberDeviceResponse = mockRememberDeviceResponse
self.mockForgetDeviceResponse = mockForgetDeviceResponse
self.mockConfirmDeviceResponse = mockConfirmDeviceResponse
@@ -149,98 +149,98 @@ struct MockIdentityProvider: CognitoUserPoolBehavior {
}
/// Throws InitiateAuthOutputError
- func initiateAuth(input: InitiateAuthInput) async throws -> InitiateAuthOutputResponse {
+ func initiateAuth(input: InitiateAuthInput) async throws -> InitiateAuthOutput {
return try await mockInitiateAuthResponse!(input)
}
/// Throws RespondToAuthChallengeOutputError
func respondToAuthChallenge(
input: RespondToAuthChallengeInput
- ) async throws -> RespondToAuthChallengeOutputResponse {
+ ) async throws -> RespondToAuthChallengeOutput {
return try await mockRespondToAuthChallengeResponse!(input)
}
/// Throws SignUpOutputError
- func signUp(input: SignUpInput) async throws -> SignUpOutputResponse {
+ func signUp(input: SignUpInput) async throws -> SignUpOutput {
return try await mockSignUpResponse!(input)
}
/// Throws ConfirmSignUpOutputError
- func confirmSignUp(input: ConfirmSignUpInput) async throws -> ConfirmSignUpOutputResponse {
+ func confirmSignUp(input: ConfirmSignUpInput) async throws -> ConfirmSignUpOutput {
return try await mockConfirmSignUpResponse!(input)
}
/// Throws GlobalSignOutOutputError
- func globalSignOut(input: GlobalSignOutInput) async throws -> GlobalSignOutOutputResponse {
+ func globalSignOut(input: GlobalSignOutInput) async throws -> GlobalSignOutOutput {
return try await mockGlobalSignOutResponse!(input)
}
/// Throws RevokeTokenOutputError
- func revokeToken(input: RevokeTokenInput) async throws -> RevokeTokenOutputResponse {
+ func revokeToken(input: RevokeTokenInput) async throws -> RevokeTokenOutput {
return try await mockRevokeTokenResponse!(input)
}
- func getUserAttributeVerificationCode(input: GetUserAttributeVerificationCodeInput) async throws -> GetUserAttributeVerificationCodeOutputResponse {
- return try await mockGetUserAttributeVerificationCodeOutputResponse!(input)
+ func getUserAttributeVerificationCode(input: GetUserAttributeVerificationCodeInput) async throws -> GetUserAttributeVerificationCodeOutput {
+ return try await mockGetUserAttributeVerificationCodeOutput!(input)
}
- func getUser(input: GetUserInput) async throws -> GetUserOutputResponse {
+ func getUser(input: GetUserInput) async throws -> GetUserOutput {
return try await mockGetUserAttributeResponse!(input)
}
- func updateUserAttributes(input: UpdateUserAttributesInput) async throws -> UpdateUserAttributesOutputResponse {
+ func updateUserAttributes(input: UpdateUserAttributesInput) async throws -> UpdateUserAttributesOutput {
return try await mockUpdateUserAttributeResponse!(input)
}
- func verifyUserAttribute(input: VerifyUserAttributeInput) async throws -> VerifyUserAttributeOutputResponse {
- return try await mockConfirmUserAttributeOutputResponse!(input)
+ func verifyUserAttribute(input: VerifyUserAttributeInput) async throws -> VerifyUserAttributeOutput {
+ return try await mockConfirmUserAttributeOutput!(input)
}
- func changePassword(input: ChangePasswordInput) async throws -> ChangePasswordOutputResponse {
- return try await mockChangePasswordOutputResponse!(input)
+ func changePassword(input: ChangePasswordInput) async throws -> ChangePasswordOutput {
+ return try await mockChangePasswordOutput!(input)
}
- func resendConfirmationCode(input: ResendConfirmationCodeInput) async throws -> ResendConfirmationCodeOutputResponse {
- return try await mockResendConfirmationCodeOutputResponse!(input)
+ func resendConfirmationCode(input: ResendConfirmationCodeInput) async throws -> ResendConfirmationCodeOutput {
+ return try await mockResendConfirmationCodeOutput!(input)
}
- func deleteUser(input: DeleteUserInput) async throws -> DeleteUserOutputResponse {
- return try await mockDeleteUserOutputResponse!(input)
+ func deleteUser(input: DeleteUserInput) async throws -> DeleteUserOutput {
+ return try await mockDeleteUserOutput!(input)
}
- func forgotPassword(input: ForgotPasswordInput) async throws -> ForgotPasswordOutputResponse {
- return try await mockForgotPasswordOutputResponse!(input)
+ func forgotPassword(input: ForgotPasswordInput) async throws -> ForgotPasswordOutput {
+ return try await mockForgotPasswordOutput!(input)
}
- func confirmForgotPassword(input: ConfirmForgotPasswordInput) async throws -> ConfirmForgotPasswordOutputResponse {
- return try await mockConfirmForgotPasswordOutputResponse!(input)
+ func confirmForgotPassword(input: ConfirmForgotPasswordInput) async throws -> ConfirmForgotPasswordOutput {
+ return try await mockConfirmForgotPasswordOutput!(input)
}
- func listDevices(input: ListDevicesInput) async throws -> ListDevicesOutputResponse {
- return try await mockListDevicesOutputResponse!(input)
+ func listDevices(input: ListDevicesInput) async throws -> ListDevicesOutput {
+ return try await mockListDevicesOutput!(input)
}
- func updateDeviceStatus(input: UpdateDeviceStatusInput) async throws -> UpdateDeviceStatusOutputResponse {
+ func updateDeviceStatus(input: UpdateDeviceStatusInput) async throws -> UpdateDeviceStatusOutput {
return try await mockRememberDeviceResponse!(input)
}
- func forgetDevice(input: ForgetDeviceInput) async throws -> ForgetDeviceOutputResponse {
+ func forgetDevice(input: ForgetDeviceInput) async throws -> ForgetDeviceOutput {
return try await mockForgetDeviceResponse!(input)
}
- func confirmDevice(input: ConfirmDeviceInput) async throws -> ConfirmDeviceOutputResponse {
+ func confirmDevice(input: ConfirmDeviceInput) async throws -> ConfirmDeviceOutput {
return try await mockConfirmDeviceResponse!(input)
}
- func associateSoftwareToken(input: AWSCognitoIdentityProvider.AssociateSoftwareTokenInput) async throws -> AWSCognitoIdentityProvider.AssociateSoftwareTokenOutputResponse {
+ func associateSoftwareToken(input: AWSCognitoIdentityProvider.AssociateSoftwareTokenInput) async throws -> AWSCognitoIdentityProvider.AssociateSoftwareTokenOutput {
return try await mockAssociateSoftwareTokenResponse!(input)
}
- func verifySoftwareToken(input: AWSCognitoIdentityProvider.VerifySoftwareTokenInput) async throws -> AWSCognitoIdentityProvider.VerifySoftwareTokenOutputResponse {
+ func verifySoftwareToken(input: AWSCognitoIdentityProvider.VerifySoftwareTokenInput) async throws -> AWSCognitoIdentityProvider.VerifySoftwareTokenOutput {
return try await mockVerifySoftwareTokenResponse!(input)
}
- func setUserMFAPreference(input: SetUserMFAPreferenceInput) async throws -> SetUserMFAPreferenceOutputResponse {
+ func setUserMFAPreference(input: SetUserMFAPreferenceInput) async throws -> SetUserMFAPreferenceOutput {
return try await mockSetUserMFAPreferenceResponse!(input)
}
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/AuthorizationTests/AWSAuthFetchSignInSessionOperationTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/AuthorizationTests/AWSAuthFetchSignInSessionOperationTests.swift
index e88cc1e53c..ed107d34d7 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/AuthorizationTests/AWSAuthFetchSignInSessionOperationTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/AuthorizationTests/AWSAuthFetchSignInSessionOperationTests.swift
@@ -95,7 +95,7 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests {
AmplifyCredentials.testData))
let initAuth: MockIdentityProvider.MockInitiateAuthResponse = { _ in
resultExpectation.fulfill()
- return InitiateAuthOutputResponse(authenticationResult: .init(
+ return InitiateAuthOutput(authenticationResult: .init(
accessToken: "accessToken",
expiresIn: 1000,
idToken: "idToken",
@@ -259,7 +259,7 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests {
AmplifyCredentials.testDataWithExpiredTokens))
let initAuth: MockIdentityProvider.MockInitiateAuthResponse = { _ in
- return InitiateAuthOutputResponse(authenticationResult: .init(accessToken: "accessToken",
+ return InitiateAuthOutput(authenticationResult: .init(accessToken: "accessToken",
expiresIn: 1000,
idToken: "idToken",
refreshToken: "refreshToke"))
@@ -493,7 +493,7 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests {
AmplifyCredentials.testDataWithExpiredTokens))
let initAuth: MockIdentityProvider.MockInitiateAuthResponse = { _ in
- return InitiateAuthOutputResponse(authenticationResult: .init(accessToken: nil,
+ return InitiateAuthOutput(authenticationResult: .init(accessToken: nil,
expiresIn: 1000,
idToken: "idToken",
refreshToken: "refreshToke"))
@@ -546,14 +546,14 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests {
AmplifyCredentials.testDataWithExpiredTokens))
let initAuth: MockIdentityProvider.MockInitiateAuthResponse = { _ in
- return InitiateAuthOutputResponse(authenticationResult: .init(accessToken: "accessToken",
+ return InitiateAuthOutput(authenticationResult: .init(accessToken: "accessToken",
expiresIn: 1000,
idToken: "idToken",
refreshToken: "refreshToke"))
}
let awsCredentials: MockIdentity.MockGetCredentialsResponse = { _ in
- return GetCredentialsForIdentityOutputResponse(credentials: nil, identityId: "ss")
+ return GetCredentialsForIdentityOutput(credentials: nil, identityId: "ss")
}
let plugin = configurePluginWith(
userPool: { MockIdentityProvider(mockInitiateAuthResponse: initAuth) },
@@ -608,7 +608,7 @@ class AWSAuthFetchSignInSessionOperationTests: BaseAuthorizationTests {
expiration: Date(),
secretKey: "secret",
sessionToken: "session")
- return GetCredentialsForIdentityOutputResponse(credentials: credentials,
+ return GetCredentialsForIdentityOutput(credentials: credentials,
identityId: "ss")
}
let plugin = configurePluginWith(
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/AuthenticationProviderDeleteUserTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/AuthenticationProviderDeleteUserTests.swift
index 2e0b2a06c2..d7d8080386 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/AuthenticationProviderDeleteUserTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/AuthenticationProviderDeleteUserTests.swift
@@ -20,12 +20,12 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
func testDeleteUserSuccess() async {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
- try await DeleteUserOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ mockDeleteUserOutput: { _ in
+ try await DeleteUserOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}
)
do {
@@ -53,8 +53,8 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
}, mockGlobalSignOutResponse: { _ in
throw AWSCognitoIdentityProvider.InternalErrorException()
},
- mockDeleteUserOutputResponse: { _ in
- try await DeleteUserOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ mockDeleteUserOutput: { _ in
+ try await DeleteUserOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}
)
do {
@@ -79,11 +79,11 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
func testOfflineDeleteUser() async throws {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
+ mockDeleteUserOutput: { _ in
throw CommonRunTimeError.crtError(CRTError(code: 1059))
}
)
@@ -113,11 +113,11 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
func testOfflineDeleteUserAndRetry() async throws {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
+ mockDeleteUserOutput: { _ in
throw CommonRunTimeError.crtError(CRTError(code: 1059))
}
)
@@ -134,12 +134,12 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
- try await DeleteUserOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ mockDeleteUserOutput: { _ in
+ try await DeleteUserOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}
)
do {
@@ -165,11 +165,11 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
func testDeleteUserInternalErrorException() async {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
+ mockDeleteUserOutput: { _ in
throw AWSClientRuntime.UnknownAWSHTTPServiceError(
httpResponse: .init(body: .empty, statusCode: .badRequest),
message: nil,
@@ -203,11 +203,11 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
func testDeleteUserWithInvalidParameterException() async {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
+ mockDeleteUserOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidParameterException()
}
)
@@ -237,11 +237,11 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
func testDeleteUserWithNotAuthorizedException() async {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
+ mockDeleteUserOutput: { _ in
throw AWSCognitoIdentityProvider.NotAuthorizedException()
}
)
@@ -270,11 +270,11 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
func testDeleteUserWithPasswordResetRequiredException() async {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
+ mockDeleteUserOutput: { _ in
throw AWSCognitoIdentityProvider.PasswordResetRequiredException()
}
)
@@ -304,11 +304,11 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
func testDeleteUserWithResourceNotFoundException() async {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
+ mockDeleteUserOutput: { _ in
throw AWSCognitoIdentityProvider.ResourceNotFoundException()
}
)
@@ -338,11 +338,11 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
func testDeleteUserWithTooManyRequestsException() async {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
+ mockDeleteUserOutput: { _ in
throw AWSCognitoIdentityProvider.TooManyRequestsException()
}
)
@@ -372,11 +372,11 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
func testDeleteUserWithUserNotConfirmedException() async {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
+ mockDeleteUserOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotConfirmedException()
}
)
@@ -407,11 +407,11 @@ class AuthenticationProviderDeleteUserTests: BasePluginTest {
func testDeleteUserWithUserNotFoundException() async {
mockIdentityProvider = MockIdentityProvider(
mockRevokeTokenResponse: { _ in
- try await RevokeTokenOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await RevokeTokenOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}, mockGlobalSignOutResponse: { _ in
- try await GlobalSignOutOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ try await GlobalSignOutOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockDeleteUserOutputResponse: { _ in
+ mockDeleteUserOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotFoundException()
}
)
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/ClientBehaviorConfirmResetPasswordTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/ClientBehaviorConfirmResetPasswordTests.swift
index 83ee5c4c3a..b8445af966 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/ClientBehaviorConfirmResetPasswordTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/ClientBehaviorConfirmResetPasswordTests.swift
@@ -20,8 +20,8 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
override func setUp() {
super.setUp()
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
- try await ConfirmForgotPasswordOutputResponse(httpResponse: MockHttpResponse.ok)
+ mockConfirmForgotPasswordOutput: { _ in
+ try await ConfirmForgotPasswordOutput(httpResponse: MockHttpResponse.ok)
}
)
}
@@ -62,8 +62,8 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
///
func testSuccessfulConfirmResetPassword() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
- try await ConfirmForgotPasswordOutputResponse(httpResponse: MockHttpResponse.ok)
+ mockConfirmForgotPasswordOutput: { _ in
+ try await ConfirmForgotPasswordOutput(httpResponse: MockHttpResponse.ok)
}
)
try await plugin.confirmResetPassword(for: "username", with: "newpassword", confirmationCode: "code", options: nil)
@@ -80,8 +80,8 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithEmptyUserName() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
- try await ConfirmForgotPasswordOutputResponse(httpResponse: MockHttpResponse.ok)
+ mockConfirmForgotPasswordOutput: { _ in
+ try await ConfirmForgotPasswordOutput(httpResponse: MockHttpResponse.ok)
}
)
do {
@@ -106,10 +106,10 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithPluginOptions() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { request in
+ mockConfirmForgotPasswordOutput: { request in
XCTAssertNoThrow(request.clientMetadata)
XCTAssertEqual(request.clientMetadata?["key"], "value")
- return try await ConfirmForgotPasswordOutputResponse(httpResponse: MockHttpResponse.ok)
+ return try await ConfirmForgotPasswordOutput(httpResponse: MockHttpResponse.ok)
}
)
let pluginOptions = AWSAuthConfirmResetPasswordOptions(metadata: ["key": "value"])
@@ -130,8 +130,8 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithEmptyNewPassword() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
- try await ConfirmForgotPasswordOutputResponse(httpResponse: MockHttpResponse.ok)
+ mockConfirmForgotPasswordOutput: { _ in
+ try await ConfirmForgotPasswordOutput(httpResponse: MockHttpResponse.ok)
}
)
do {
@@ -157,7 +157,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithCodeMismatchException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.CodeMismatchException(
message: "code mismatch"
)
@@ -190,7 +190,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithExpiredCodeException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.ExpiredCodeException(
message: "code expired"
)
@@ -222,7 +222,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithInternalErrorException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.InternalErrorException(
message: "internal error"
)
@@ -250,7 +250,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
///
func testConfirmResetPasswordWithInvalidLambdaResponseException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw try await AWSCognitoIdentityProvider.InvalidLambdaResponseException(
httpResponse: .init(body: .empty, statusCode: .accepted)
)
@@ -284,7 +284,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithInvalidParameterException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidParameterException(
message: "invalid parameter"
)
@@ -318,7 +318,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithInvalidPasswordException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidPasswordException(
message: "invalid password"
)
@@ -352,7 +352,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithLimitExceededException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.LimitExceededException(
message: "limit exceeded"
)
@@ -386,7 +386,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithNotAuthorizedException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.NotAuthorizedException(
message: "not authorized"
)
@@ -416,7 +416,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithResourceNotFoundException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.ResourceNotFoundException(
message: "resource not found"
)
@@ -450,7 +450,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithTooManyFailedAttemptsException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.TooManyFailedAttemptsException(
message: "too many failed attempts"
)
@@ -484,7 +484,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithTooManyRequestsException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.TooManyRequestsException(
message: "too many requests"
)
@@ -518,7 +518,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithUnexpectedLambdaException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.UnexpectedLambdaException(
message: "unexpected lambda"
)
@@ -552,7 +552,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithUserLambdaValidationException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.UserLambdaValidationException(
message: "user lambda invalid"
)
@@ -586,7 +586,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithUserNotConfirmedException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotConfirmedException(
message: "user not confirmed"
)
@@ -620,7 +620,7 @@ class ClientBehaviorConfirmResetPasswordTests: AWSCognitoAuthClientBehaviorTests
func testConfirmResetPasswordWithUserNotFoundException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockConfirmForgotPasswordOutputResponse: { _ in
+ mockConfirmForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotFoundException(
message: "user not found"
)
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/ClientBehaviorResetPasswordTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/ClientBehaviorResetPasswordTests.swift
index 0fe20404ae..e24e688536 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/ClientBehaviorResetPasswordTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/ClientBehaviorResetPasswordTests.swift
@@ -19,8 +19,8 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
override func setUp() {
super.setUp()
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
- ForgotPasswordOutputResponse(codeDeliveryDetails: .init())
+ mockForgotPasswordOutput: { _ in
+ ForgotPasswordOutput(codeDeliveryDetails: .init())
}
)
}
@@ -64,8 +64,8 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
deliveryMedium: .email,
destination: "Amplify@amazon.com")
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
- ForgotPasswordOutputResponse(codeDeliveryDetails: codeDeliveryDetails)
+ mockForgotPasswordOutput: { _ in
+ ForgotPasswordOutput(codeDeliveryDetails: codeDeliveryDetails)
}
)
_ = try await plugin.resetPassword(for: "user", options: nil)
@@ -82,8 +82,8 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithNilCodeDeliveryDetails() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
- ForgotPasswordOutputResponse(codeDeliveryDetails: nil)
+ mockForgotPasswordOutput: { _ in
+ ForgotPasswordOutput(codeDeliveryDetails: nil)
}
)
@@ -112,8 +112,8 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
deliveryMedium: .email,
destination: "Amplify@amazon.com")
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
- ForgotPasswordOutputResponse(codeDeliveryDetails: codeDeliveryDetails)
+ mockForgotPasswordOutput: { _ in
+ ForgotPasswordOutput(codeDeliveryDetails: codeDeliveryDetails)
}
)
@@ -140,7 +140,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithCodeDeliveryFailureException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.CodeDeliveryFailureException(
message: "Code delivery failure"
)
@@ -172,7 +172,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithInternalErrorException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw try await AWSCognitoIdentityProvider.InternalErrorException(
httpResponse: .init(body: .empty, statusCode: .accepted)
)
@@ -200,7 +200,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
///
func testResetPasswordWithInvalidEmailRoleAccessPolicyException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidEmailRoleAccessPolicyException(
message: "invalid email role"
)
@@ -232,7 +232,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
///
func testResetPasswordWithInvalidLambdaResponseException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidLambdaResponseException(
message: "Invalid lambda response"
)
@@ -266,7 +266,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithInvalidParameterException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidParameterException(
message: "invalid parameter"
)
@@ -298,7 +298,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
///
func testResetPasswordWithInvalidSmsRoleAccessPolicyException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidSmsRoleAccessPolicyException(
message: "invalid sms role"
)
@@ -330,7 +330,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
///
func testResetPasswordWithInvalidSmsRoleTrustRelationshipException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidSmsRoleTrustRelationshipException(
message: "invalid sms role trust relationship"
)
@@ -364,7 +364,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithLimitExceededException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.LimitExceededException(
message: "limit exceeded"
)
@@ -398,7 +398,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithNotAuthorizedException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.NotAuthorizedException(
message: "not authorized"
)
@@ -428,7 +428,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithResourceNotFoundException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.ResourceNotFoundException(
message: "resource not found"
)
@@ -462,7 +462,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithTooManyRequestsException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.TooManyRequestsException(
message: "too many requests"
)
@@ -496,7 +496,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithUnexpectedLambdaException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.UnexpectedLambdaException(
message: "unexpected lambda"
)
@@ -530,7 +530,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithUserLambdaValidationException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.UserLambdaValidationException(
message: "user lambda validation exception"
)
@@ -565,7 +565,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithUserNotConfirmedException() {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw ForgotPasswordOutputError.userNotConfirmedException(UserNotConfirmedException(message: "user not confirmed"))
}
)
@@ -607,7 +607,7 @@ class ClientBehaviorResetPasswordTests: AWSCognitoAuthClientBehaviorTests {
func testResetPasswordWithUserNotFoundException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockForgotPasswordOutputResponse: { _ in
+ mockForgotPasswordOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotFoundException(
message: "user not found"
)
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInOptionsTestCase.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInOptionsTestCase.swift
index 00382ca375..3968b20914 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInOptionsTestCase.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInOptionsTestCase.swift
@@ -20,13 +20,13 @@ class AWSAuthSignInOptionsTestCase: BasePluginTest {
override func setUp() {
super.setUp()
mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .init(
accessToken: Defaults.validAccessToken,
expiresIn: 300,
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInPluginTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInPluginTests.swift
index 7302e89996..47330f44ee 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInPluginTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/AWSAuthSignInPluginTests.swift
@@ -31,14 +31,14 @@ class AWSAuthSignInPluginTests: BasePluginTest {
let clientMetadata = ["somekey": "somevalue"]
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
XCTAssertEqual(clientMetadata, input.clientMetadata)
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
XCTAssertEqual(clientMetadata, input.clientMetadata)
- return RespondToAuthChallengeOutputResponse(
+ return RespondToAuthChallengeOutput(
authenticationResult: .init(
accessToken: Defaults.validAccessToken,
expiresIn: 300,
@@ -78,13 +78,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSuccessfulSignInWithAuthFlow() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .init(
accessToken: Defaults.validAccessToken,
expiresIn: 300,
@@ -157,13 +157,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
mockGetCredentialsResponse: getCredentials)
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .init(
accessToken: Defaults.validAccessToken,
expiresIn: 300,
@@ -201,7 +201,7 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithInvalidResult() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse()
+ InitiateAuthOutput()
})
let options = AuthSignInRequest.Options()
do {
@@ -227,7 +227,7 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSecondSignInAfterSignInWithInvalidResult() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse()
+ InitiateAuthOutput()
})
let options = AuthSignInRequest.Options()
do {
@@ -235,13 +235,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
XCTFail("Should not receive a success response \(result)")
} catch {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .init(
accessToken: Defaults.validAccessToken,
expiresIn: 300,
@@ -275,13 +275,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithNextStepSMS() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .smsMfa,
challengeParameters: [:],
@@ -315,14 +315,14 @@ class AWSAuthSignInPluginTests: BasePluginTest {
let clientMetadata = ["somekey": "somevalue"]
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
XCTAssertEqual(clientMetadata, input.clientMetadata)
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
XCTAssertEqual(clientMetadata, input.clientMetadata)
- return RespondToAuthChallengeOutputResponse(
+ return RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .customChallenge,
challengeParameters: ["paramKey": "value"],
@@ -363,13 +363,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSMSMFAWithAdditionalInfo() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .smsMfa,
challengeParameters: ["paramKey": "value"],
@@ -406,13 +406,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithNextStepNewPassword() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .newPasswordRequired,
challengeParameters: ["paramKey": "value"],
@@ -445,13 +445,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testNewPasswordWithAdditionalInfo() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .newPasswordRequired,
challengeParameters: ["paramKey": "value"],
@@ -488,13 +488,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithNextStepCustomChallenge() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .customChallenge,
challengeParameters: ["paramKey": "value"],
@@ -527,13 +527,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithNextStepUnknown() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .sdkUnknown("no idea"),
challengeParameters: ["paramKey": "value"],
@@ -564,13 +564,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithNextDeviceSRP() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .deviceSrpAuth,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .devicePasswordVerifier,
challengeParameters: ["paramKey": "value"],
@@ -608,13 +608,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithCustomAuthIncorrectCode() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .customChallenge,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .smsMfa,
challengeParameters: ["paramKey": "value"],
@@ -648,13 +648,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithNextStepTOTP() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .softwareTokenMfa,
challengeParameters: ["paramKey": "value"],
@@ -677,13 +677,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithNextStepSelectMFAType() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .selectMfaType,
challengeParameters: ["MFAS_CAN_CHOOSE": "[\"SMS_MFA\",\"SOFTWARE_TOKEN_MFA\"]"],
@@ -708,13 +708,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithNextStepSetupMFA() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .mfaSetup,
challengeParameters: ["MFAS_CAN_SETUP": "[\"SMS_MFA\",\"SOFTWARE_TOKEN_MFA\"]"],
@@ -741,13 +741,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithNextStepSetupMFAWithUnavailableMFAType() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .mfaSetup,
challengeParameters: ["MFAS_CAN_SETUP": "[\"SMS_MFA\"]"],
@@ -1194,10 +1194,10 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithAliasExistsException() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
throw AWSCognitoIdentityProvider.AliasExistsException()
@@ -1229,10 +1229,10 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testSignInWithInvalidPasswordException() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
throw AWSCognitoIdentityProvider.InvalidPasswordException()
@@ -1263,13 +1263,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
func testRestartSignIn() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .smsMfa,
challengeParameters: [:],
@@ -1287,13 +1287,13 @@ class AWSAuthSignInPluginTests: BasePluginTest {
}
XCTAssertFalse(result.isSignedIn)
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .init(
accessToken: Defaults.validAccessToken,
expiresIn: 300,
@@ -1338,15 +1338,15 @@ class AWSAuthSignInPluginTests: BasePluginTest {
mockGetCredentialsResponse: getCredentials)
self.mockIdentityProvider = MockIdentityProvider(mockRevokeTokenResponse: { _ in
- RevokeTokenOutputResponse()
+ RevokeTokenOutput()
}, mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .init(
accessToken: Defaults.validAccessToken,
expiresIn: 300,
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/SignInSetUpTOTPTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/SignInSetUpTOTPTests.swift
index 6a6e10ab93..387a70f340 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/SignInSetUpTOTPTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignIn/SignInSetUpTOTPTests.swift
@@ -29,10 +29,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
///
func testSuccessfulTOTPSetupChallenge() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -63,13 +63,13 @@ class SignInSetUpTOTPTests: BasePluginTest {
func testSignInWithNextStepSetupMFAWithUnavailableMFAType() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .mfaSetup,
challengeParameters: ["MFAS_CAN_SETUP": "[\"SMS_MFA\"]"],
@@ -102,10 +102,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
///
func testSuccessfulTOTPSetupChallengeWithEmptyMFASCanSetup() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -143,10 +143,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
func testSignInWithInvalidResult() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -183,10 +183,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
func testSecondSignInAfterSignInWithInvalidResult() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -201,10 +201,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
XCTFail("Should not receive a success response \(result)")
} catch {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -244,10 +244,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
func testSignInWithInternalErrorException() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -282,10 +282,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
func testSignInWithInvalidParameterException() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -321,10 +321,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
func testSignInWithNotAuthorizedException() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -359,10 +359,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
func testSignInWithResourceNotFoundException() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -398,10 +398,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
func testSignInWithConcurrentModificationException() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -436,10 +436,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
func testSignInWithForbiddenException() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -474,10 +474,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
func testSignInWithSoftwareTokenMFANotFoundException() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
@@ -513,10 +513,10 @@ class SignInSetUpTOTPTests: BasePluginTest {
func testSignInWithUnknownAWSHttpServiceError() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { input in
- return InitiateAuthOutputResponse(
+ return InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { input in
return .testData(
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignUp/AWSAuthResendSignUpCodeAPITests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignUp/AWSAuthResendSignUpCodeAPITests.swift
index 80858c4bf8..9ad2404e72 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignUp/AWSAuthResendSignUpCodeAPITests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/ClientBehaviorTests/SignUp/AWSAuthResendSignUpCodeAPITests.swift
@@ -19,8 +19,8 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
override func setUp() {
super.setUp()
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
- ResendConfirmationCodeOutputResponse(codeDeliveryDetails: .init())
+ mockResendConfirmationCodeOutput: { _ in
+ ResendConfirmationCodeOutput(codeDeliveryDetails: .init())
}
)
}
@@ -65,8 +65,8 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
deliveryMedium: .email,
destination: nil)
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
- ResendConfirmationCodeOutputResponse(codeDeliveryDetails: codeDeliveryDetails)
+ mockResendConfirmationCodeOutput: { _ in
+ ResendConfirmationCodeOutput(codeDeliveryDetails: codeDeliveryDetails)
}
)
@@ -91,8 +91,8 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
deliveryMedium: .email,
destination: nil)
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
- ResendConfirmationCodeOutputResponse(codeDeliveryDetails: codeDeliveryDetails)
+ mockResendConfirmationCodeOutput: { _ in
+ ResendConfirmationCodeOutput(codeDeliveryDetails: codeDeliveryDetails)
}
)
@@ -118,7 +118,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
func testResendSignupCodeWithInvalidResult() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AuthError.unknown("Unknown error", nil)
}
)
@@ -147,7 +147,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
func testResendSignupCodeWithCodeDeliveryFailureException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw try await AWSCognitoIdentityProvider.CodeDeliveryFailureException(
httpResponse: .init(body: .empty, statusCode: .accepted)
)
@@ -178,7 +178,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithInternalErrorException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.InternalErrorException(
message: "internal error"
)
@@ -206,7 +206,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithInvalidEmailRoleAccessPolicyException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidEmailRoleAccessPolicyException(
message: "Invalid email role access policy"
)
@@ -238,7 +238,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithinvalidSmsRoleAccessPolicyException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidSmsRoleAccessPolicyException(
message: "Invalid sms role access policy"
)
@@ -270,7 +270,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithInvalidSmsRoleTrustRelationshipException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidSmsRoleTrustRelationshipException(
message: "Invalid sms role trust relationship"
)
@@ -302,7 +302,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithInvalidLambdaResponseException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidLambdaResponseException(
message: "Invalid lambda response"
)
@@ -335,7 +335,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithInvalidParameterException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidParameterException(
message: "invalid parameter"
)
@@ -368,7 +368,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithLimitExceededException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.LimitExceededException(
message: "limit exceeded"
)
@@ -401,7 +401,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithNotAuthorizedException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.NotAuthorizedException(
message: "not authorized"
)
@@ -430,7 +430,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithResourceNotFoundException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.ResourceNotFoundException(
message: "resource not found"
)
@@ -463,7 +463,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithTooManyRequestsException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.TooManyRequestsException(
message: "too many requests"
)
@@ -496,7 +496,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithUnexpectedLambdaException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.UnexpectedLambdaException(
message: "unexpected lambda"
)
@@ -529,7 +529,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeWithUserLambdaValidationException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.UserLambdaValidationException(
message: "user lambda validation exception"
)
@@ -562,7 +562,7 @@ class AWSAuthResendSignUpCodeAPITests: AWSCognitoAuthClientBehaviorTests {
///
func testResendSignupCodeUpWithUserNotFoundException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockResendConfirmationCodeOutputResponse: { _ in
+ mockResendConfirmationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotFoundException(
message: "user not found"
)
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorFetchDevicesTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorFetchDevicesTests.swift
index 54c3b1b34b..fb9dea7ad4 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorFetchDevicesTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorFetchDevicesTests.swift
@@ -19,8 +19,8 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
override func setUp() {
super.setUp()
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
- try await ListDevicesOutputResponse(httpResponse: MockHttpResponse.ok)
+ mockListDevicesOutput: { _ in
+ try await ListDevicesOutput(httpResponse: MockHttpResponse.ok)
}
)
}
@@ -35,8 +35,8 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
///
func testFetchDevicesRequest() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
- ListDevicesOutputResponse(devices: [CognitoIdentityProviderClientTypes.DeviceType(deviceKey: "id")], paginationToken: nil)
+ mockListDevicesOutput: { _ in
+ ListDevicesOutput(devices: [CognitoIdentityProviderClientTypes.DeviceType(deviceKey: "id")], paginationToken: nil)
}
)
let options = AuthFetchDevicesRequest.Options()
@@ -53,8 +53,8 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
///
func testFetchDevicesRequestWithoutOptions() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
- ListDevicesOutputResponse(devices: [CognitoIdentityProviderClientTypes.DeviceType(deviceKey: "id")], paginationToken: nil)
+ mockListDevicesOutput: { _ in
+ ListDevicesOutput(devices: [CognitoIdentityProviderClientTypes.DeviceType(deviceKey: "id")], paginationToken: nil)
}
)
_ = try await plugin.fetchDevices()
@@ -71,8 +71,8 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
func testSuccessfulListDevices() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
- ListDevicesOutputResponse(devices: [CognitoIdentityProviderClientTypes.DeviceType(deviceKey: "id")], paginationToken: nil)
+ mockListDevicesOutput: { _ in
+ ListDevicesOutput(devices: [CognitoIdentityProviderClientTypes.DeviceType(deviceKey: "id")], paginationToken: nil)
}
)
let listDevicesResult = try await plugin.fetchDevices()
@@ -93,8 +93,8 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
func testListDevicesWithInvalidResult() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
- ListDevicesOutputResponse(devices: nil, paginationToken: nil)
+ mockListDevicesOutput: { _ in
+ ListDevicesOutput(devices: nil, paginationToken: nil)
}
)
do {
@@ -123,7 +123,7 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
func testListDevicesWithInternalErrorException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
+ mockListDevicesOutput: { _ in
throw try await AWSCognitoIdentityProvider.InternalErrorException(
httpResponse: .init(body: .empty, statusCode: .accepted)
)
@@ -153,7 +153,7 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
func testListDevicesWithInvalidParameterException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
+ mockListDevicesOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidParameterException(
message: "invalid parameter"
)
@@ -187,7 +187,7 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
func testListDevicesWithInvalidUserPoolConfigurationException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
+ mockListDevicesOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidUserPoolConfigurationException(
message: "invalid user poo configuration"
)
@@ -217,7 +217,7 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
func testListDevicesWithNotAuthorizedException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
+ mockListDevicesOutput: { _ in
throw AWSCognitoIdentityProvider.NotAuthorizedException(
message: "not authorized"
)
@@ -247,7 +247,7 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
func testListDevicesWithPasswordResetRequiredException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
+ mockListDevicesOutput: { _ in
throw AWSCognitoIdentityProvider.PasswordResetRequiredException(
message: "password reset required"
)
@@ -281,7 +281,7 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
func testListDevicesWithResourceNotFoundException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
+ mockListDevicesOutput: { _ in
throw AWSCognitoIdentityProvider.ResourceNotFoundException(
message: "resource not found"
)
@@ -315,7 +315,7 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
func testListDevicesWithTooManyRequestsException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
+ mockListDevicesOutput: { _ in
throw AWSCognitoIdentityProvider.TooManyRequestsException(
message: "too many requests"
)
@@ -349,7 +349,7 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
func testListDevicesWithUserNotConfirmedException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
+ mockListDevicesOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotConfirmedException(
message: "user not confirmed"
)
@@ -383,7 +383,7 @@ class DeviceBehaviorFetchDevicesTests: BasePluginTest {
func testListDevicesWithUserNotFoundException() async throws {
mockIdentityProvider = MockIdentityProvider(
- mockListDevicesOutputResponse: { _ in
+ mockListDevicesOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotFoundException(
message: "user not found"
)
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorForgetDeviceTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorForgetDeviceTests.swift
index bc9cab19e4..a8cc6e99cc 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorForgetDeviceTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorForgetDeviceTests.swift
@@ -20,7 +20,7 @@ class DeviceBehaviorForgetDeviceTests: BasePluginTest {
super.setUp()
mockIdentityProvider = MockIdentityProvider(
mockForgetDeviceResponse: { _ in
- try await ForgetDeviceOutputResponse(httpResponse: MockHttpResponse.ok)
+ try await ForgetDeviceOutput(httpResponse: MockHttpResponse.ok)
}
)
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorRememberDeviceTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorRememberDeviceTests.swift
index 6403a5534c..5f92f37bcf 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorRememberDeviceTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/DeviceBehaviorTests/DeviceBehaviorRememberDeviceTests.swift
@@ -20,7 +20,7 @@ class DeviceBehaviorRememberDeviceTests: BasePluginTest {
super.setUp()
mockIdentityProvider = MockIdentityProvider(
mockRememberDeviceResponse: { _ in
- try await UpdateDeviceStatusOutputResponse(
+ try await UpdateDeviceStatusOutput(
httpResponse: MockHttpResponse.ok
)
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/HostedUITests/AWSAuthHostedUISignInTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/HostedUITests/AWSAuthHostedUISignInTests.swift
index 20c06d50bf..5a1a14acc1 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/HostedUITests/AWSAuthHostedUISignInTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/HostedUITests/AWSAuthHostedUISignInTests.swift
@@ -309,13 +309,13 @@ class AWSAuthHostedUISignInTests: XCTestCase {
func testRestartSignInWithWebUI() async {
self.mockIdentityProvider = MockIdentityProvider(mockInitiateAuthResponse: { _ in
- InitiateAuthOutputResponse(
+ InitiateAuthOutput(
authenticationResult: .none,
challengeName: .passwordVerifier,
- challengeParameters: InitiateAuthOutputResponse.validChalengeParams,
+ challengeParameters: InitiateAuthOutput.validChalengeParams,
session: "someSession")
}, mockRespondToAuthChallengeResponse: { _ in
- RespondToAuthChallengeOutputResponse(
+ RespondToAuthChallengeOutput(
authenticationResult: .none,
challengeName: .smsMfa,
challengeParameters: [:],
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/AWSCognitoAuthUserBehaviorTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/AWSCognitoAuthUserBehaviorTests.swift
index 4412af3802..f5110aca6a 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/AWSCognitoAuthUserBehaviorTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/AWSCognitoAuthUserBehaviorTests.swift
@@ -17,20 +17,20 @@ class AWSCognitoAuthUserBehaviorTests: BasePluginTest {
override func setUp() {
super.setUp()
mockIdentityProvider = MockIdentityProvider(
- mockGetUserAttributeVerificationCodeOutputResponse: { _ in
- GetUserAttributeVerificationCodeOutputResponse()
+ mockGetUserAttributeVerificationCodeOutput: { _ in
+ GetUserAttributeVerificationCodeOutput()
},
mockGetUserAttributeResponse: { _ in
- GetUserOutputResponse()
+ GetUserOutput()
},
mockUpdateUserAttributeResponse: { _ in
- UpdateUserAttributesOutputResponse()
+ UpdateUserAttributesOutput()
},
- mockConfirmUserAttributeOutputResponse: { _ in
- try await VerifyUserAttributeOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ mockConfirmUserAttributeOutput: { _ in
+ try await VerifyUserAttributeOutput(httpResponse: .init(body: .empty, statusCode: .ok))
},
- mockChangePasswordOutputResponse: { _ in
- try await ChangePasswordOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ mockChangePasswordOutput: { _ in
+ try await ChangePasswordOutput(httpResponse: .init(body: .empty, statusCode: .ok))
}
)
}
@@ -45,7 +45,7 @@ class AWSCognitoAuthUserBehaviorTests: BasePluginTest {
///
func testFetchUserAttributesRequest() async throws {
mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeResponse: { _ in
- GetUserOutputResponse(
+ GetUserOutput(
mfaOptions: [],
preferredMfaSetting: "",
userAttributes: [.init(name: "email", value: "Amplify@amazon.com")],
@@ -67,7 +67,7 @@ class AWSCognitoAuthUserBehaviorTests: BasePluginTest {
///
func testFetchUserAttributesRequestWithoutOptions() async throws {
mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeResponse: { _ in
- GetUserOutputResponse(
+ GetUserOutput(
mfaOptions: [],
preferredMfaSetting: "",
userAttributes: [.init(name: "email", value: "Amplify@amazon.com")],
@@ -145,8 +145,8 @@ class AWSCognitoAuthUserBehaviorTests: BasePluginTest {
/// - I should get a valid task completion
///
func testResendConfirmationCodeAttributeRequest() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
- GetUserAttributeVerificationCodeOutputResponse(
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
+ GetUserAttributeVerificationCodeOutput(
codeDeliveryDetails: .init(
attributeName: "attributeName",
deliveryMedium: .email,
@@ -166,11 +166,11 @@ class AWSCognitoAuthUserBehaviorTests: BasePluginTest {
/// - I should get a valid task completion
///
func testResendConfirmationCodeWithPluginOptions() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { request in
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { request in
XCTAssertNotNil(request.clientMetadata)
XCTAssertEqual(request.clientMetadata?["key"], "value")
- return GetUserAttributeVerificationCodeOutputResponse(
+ return GetUserAttributeVerificationCodeOutput(
codeDeliveryDetails: .init(
attributeName: "attributeName",
deliveryMedium: .email,
@@ -190,8 +190,8 @@ class AWSCognitoAuthUserBehaviorTests: BasePluginTest {
/// - I should get a valid task completion
///
func testResendConfirmationCodeAttributeRequestWithoutOptions() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
- GetUserAttributeVerificationCodeOutputResponse(
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
+ GetUserAttributeVerificationCodeOutput(
codeDeliveryDetails: .init(
attributeName: "attributeName",
deliveryMedium: .email,
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorChangePasswordTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorChangePasswordTests.swift
index 2ff8da0acd..4b17d9d05e 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorChangePasswordTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorChangePasswordTests.swift
@@ -24,8 +24,8 @@ class UserBehaviorChangePasswordTests: BasePluginTest {
/// - I should get a successful result
///
func testSuccessfulChangePassword() async throws {
- self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutputResponse: { _ in
- return try await ChangePasswordOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutput: { _ in
+ return try await ChangePasswordOutput(httpResponse: .init(body: .empty, statusCode: .ok))
})
try await plugin.update(oldPassword: "old password", to: "new password")
}
@@ -40,7 +40,7 @@ class UserBehaviorChangePasswordTests: BasePluginTest {
///
func testChangePasswordWithInternalErrorException() async throws {
- self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutputResponse: { _ in
+ self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutput: { _ in
throw AWSCognitoIdentityProvider.InternalErrorException(
message: "internal error exception"
)
@@ -68,7 +68,7 @@ class UserBehaviorChangePasswordTests: BasePluginTest {
///
func testChangePasswordWithInvalidParameterException() async throws {
- self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutputResponse: { _ in
+ self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidParameterException(
message: "invalid parameter exception"
)
@@ -100,7 +100,7 @@ class UserBehaviorChangePasswordTests: BasePluginTest {
///
func testChangePasswordWithInvalidPasswordException() async throws {
- self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutputResponse: { _ in
+ self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidPasswordException(
message: "invalid password exception"
)
@@ -132,7 +132,7 @@ class UserBehaviorChangePasswordTests: BasePluginTest {
///
func testChangePasswordWithLimitExceededException() async throws {
- self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutputResponse: { _ in
+ self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutput: { _ in
throw try await AWSCognitoIdentityProvider.LimitExceededException(
httpResponse: .init(body: .empty, statusCode: .accepted),
decoder: nil,
@@ -167,7 +167,7 @@ class UserBehaviorChangePasswordTests: BasePluginTest {
///
func testChangePasswordWithNotAuthorizedException() async throws {
- self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutputResponse: { _ in
+ self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutput: { _ in
throw AWSCognitoIdentityProvider.NotAuthorizedException(
message: "not authorized exception"
)
@@ -195,7 +195,7 @@ class UserBehaviorChangePasswordTests: BasePluginTest {
///
func testChangePasswordWithPasswordResetRequiredException() async throws {
- self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutputResponse: { _ in
+ self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutput: { _ in
throw AWSCognitoIdentityProvider.PasswordResetRequiredException(
message: "password reset required exception"
)
@@ -227,7 +227,7 @@ class UserBehaviorChangePasswordTests: BasePluginTest {
///
func testChangePasswordWithResourceNotFoundException() async throws {
- self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutputResponse: { _ in
+ self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutput: { _ in
throw AWSCognitoIdentityProvider.ResourceNotFoundException(
message: "resource not found exception"
)
@@ -259,7 +259,7 @@ class UserBehaviorChangePasswordTests: BasePluginTest {
///
func testChangePasswordWithTooManyRequestsException() async throws {
- self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutputResponse: { _ in
+ self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutput: { _ in
throw AWSCognitoIdentityProvider.TooManyRequestsException(
message: "too many requests exception"
)
@@ -291,7 +291,7 @@ class UserBehaviorChangePasswordTests: BasePluginTest {
///
func testChangePasswordWithUserNotConfirmedException() async throws {
- self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutputResponse: { _ in
+ self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotConfirmedException(
message: "user not confirmed exception"
)
@@ -323,7 +323,7 @@ class UserBehaviorChangePasswordTests: BasePluginTest {
///
func testChangePasswordWithUserNotFoundException() async throws {
- self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutputResponse: { _ in
+ self.mockIdentityProvider = MockIdentityProvider(mockChangePasswordOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotFoundException(
message: "user not found exception"
)
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorConfirmAttributeTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorConfirmAttributeTests.swift
index b69c260145..870afbbe4f 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorConfirmAttributeTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorConfirmAttributeTests.swift
@@ -22,8 +22,8 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
/// - I should get a successful result
///
func testSuccessfulConfirmUpdateUserAttributes() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
- try await VerifyUserAttributeOutputResponse(httpResponse: .init(body: .empty, statusCode: .ok))
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
+ try await VerifyUserAttributeOutput(httpResponse: .init(body: .empty, statusCode: .ok))
})
try await plugin.confirm(userAttribute: .email, confirmationCode: "code")
}
@@ -40,7 +40,7 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
/// - I should get a .service error with .codeMismatch as underlyingError
///
func testConfirmUpdateUserAttributesWithCodeMismatchException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
throw AWSCognitoIdentityProvider.CodeMismatchException()
})
do {
@@ -69,7 +69,7 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
///
func testConfirmUpdateUserAttributesWithExpiredCodeException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
throw AWSCognitoIdentityProvider.ExpiredCodeException()
})
do {
@@ -97,7 +97,7 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
///
func testcConfirmUpdateUserAttributesWithInternalErrorException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
throw try await AWSCognitoIdentityProvider.InternalErrorException(
httpResponse: .init(body: .empty, statusCode: .accepted),
decoder: nil,
@@ -128,7 +128,7 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
///
func testConfirmUpdateUserAttributesWithInvalidParameterException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidParameterException()
})
do {
@@ -158,7 +158,7 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
///
func testConfirmUpdateUserAttributesWithLimitExceededException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
throw AWSCognitoIdentityProvider.LimitExceededException()
})
do {
@@ -188,7 +188,7 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
///
func testConfirmUpdateUserAttributesWithNotAuthorizedException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
throw AWSCognitoIdentityProvider.NotAuthorizedException()
})
do {
@@ -214,7 +214,7 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
///
func testConfirmUpdateUserAttributesWithPasswordResetRequiredException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
throw AWSCognitoIdentityProvider.PasswordResetRequiredException()
})
do {
@@ -244,7 +244,7 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
///
func testConfirmUpdateUserAttributesWithResourceNotFoundException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
throw AWSCognitoIdentityProvider.ResourceNotFoundException()
})
do {
@@ -274,7 +274,7 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
///
func testConfirmUpdateUserAttributesWithTooManyRequestsException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
throw AWSCognitoIdentityProvider.TooManyRequestsException()
})
@@ -305,7 +305,7 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
///
func testConfirmUpdateUserAttributesWithUserNotConfirmedException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotConfirmedException()
})
@@ -336,7 +336,7 @@ class UserBehaviorConfirmAttributeTests: BasePluginTest {
///
func testConfirmUpdateUserAttributesWithUserNotFoundException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockConfirmUserAttributeOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotFoundException()
})
do {
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorFetchAttributeTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorFetchAttributeTests.swift
index 2ce26faf7e..d814fe0090 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorFetchAttributeTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorFetchAttributeTests.swift
@@ -25,7 +25,7 @@ class UserBehaviorFetchAttributesTests: BasePluginTest {
func testSuccessfulFetchUserAttributes() async throws {
mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeResponse: { _ in
- GetUserOutputResponse(
+ GetUserOutput(
mfaOptions: [],
preferredMfaSetting: "",
userAttributes: [.init(name: "email", value: "Amplify@amazon.com")],
@@ -50,7 +50,7 @@ class UserBehaviorFetchAttributesTests: BasePluginTest {
func testFetchUserAttributesWithInvalidResult() async throws {
mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeResponse: { _ in
- GetUserOutputResponse()
+ GetUserOutput()
})
do {
_ = try await plugin.fetchUserAttributes()
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorResendCodeTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorResendCodeTests.swift
index 401fb27a0b..89b542d82a 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorResendCodeTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorResendCodeTests.swift
@@ -25,8 +25,8 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testSuccessfulResendConfirmationCode() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
- GetUserAttributeVerificationCodeOutputResponse(
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
+ GetUserAttributeVerificationCodeOutput(
codeDeliveryDetails: .init(
attributeName: "attributeName",
deliveryMedium: .email,
@@ -50,8 +50,8 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testResendConfirmationCodeWithInvalidResult() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
- GetUserAttributeVerificationCodeOutputResponse()
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
+ GetUserAttributeVerificationCodeOutput()
})
do {
_ = try await plugin.resendConfirmationCode(forUserAttributeKey: .email)
@@ -75,7 +75,7 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testResendConfirmationCodeWithCodeMismatchException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
throw try await AWSCognitoIdentityProvider.CodeDeliveryFailureException(
httpResponse: .init(body: .empty, statusCode: .accepted),
decoder: nil,
@@ -108,7 +108,7 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testResendConfirmationCodeWithInternalErrorException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.InternalErrorException()
})
do {
@@ -134,7 +134,7 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testResendConfirmationCodeWithInvalidParameterException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.InvalidParameterException()
})
do {
@@ -164,7 +164,7 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testResendConfirmationCodeWithLimitExceededException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.LimitExceededException()
})
@@ -195,7 +195,7 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testResendConfirmationCodeWithNotAuthorizedException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.NotAuthorizedException()
})
do {
@@ -221,7 +221,7 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testResendConfirmationCodeWithPasswordResetRequiredException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.PasswordResetRequiredException()
})
do {
@@ -251,7 +251,7 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testResendConfirmationCodeWithResourceNotFoundException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.ResourceNotFoundException()
})
do {
@@ -281,7 +281,7 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testResendConfirmationCodeWithTooManyRequestsException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.TooManyRequestsException()
})
do {
@@ -311,7 +311,7 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testResendConfirmationCodeWithUserNotConfirmedException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotConfirmedException()
})
do {
@@ -341,7 +341,7 @@ class UserBehaviorResendCodeTests: BasePluginTest {
///
func testResendConfirmationCodeWithUserNotFoundException() async throws {
- mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutputResponse: { _ in
+ mockIdentityProvider = MockIdentityProvider(mockGetUserAttributeVerificationCodeOutput: { _ in
throw AWSCognitoIdentityProvider.UserNotFoundException()
})
do {
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorUpdateAttributeTests.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorUpdateAttributeTests.swift
index 568e0bdb42..75f7d52024 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorUpdateAttributeTests.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TaskTests/UserBehaviourTests/UserBehaviorUpdateAttributeTests.swift
@@ -25,7 +25,7 @@ class UserBehaviorUpdateAttributesTests: BasePluginTest {
func testSuccessfulUpdateUserAttributes() async throws {
mockIdentityProvider = MockIdentityProvider(mockUpdateUserAttributeResponse: { _ in
- UpdateUserAttributesOutputResponse(codeDeliveryDetailsList: [
+ UpdateUserAttributesOutput(codeDeliveryDetailsList: [
.init(attributeName: "attributeName",
deliveryMedium: .email,
destination: "destination")])
@@ -49,7 +49,7 @@ class UserBehaviorUpdateAttributesTests: BasePluginTest {
func testUpdateUserAttributesWithEmptyResult() async throws {
mockIdentityProvider = MockIdentityProvider(mockUpdateUserAttributeResponse: { _ in
- UpdateUserAttributesOutputResponse()
+ UpdateUserAttributesOutput()
})
_ = try await plugin.update(userAttribute: AuthUserAttribute(.email, value: "Amplify@amazon.com"))
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ChangePasswordOutputResponse+Codable.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ChangePasswordOutputResponse+Codable.swift
index dbc5cd16d9..ada8712912 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ChangePasswordOutputResponse+Codable.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ChangePasswordOutputResponse+Codable.swift
@@ -8,7 +8,7 @@
import AWSCognitoIdentityProvider
import ClientRuntime
-extension ChangePasswordOutputResponse: Codable {
+extension ChangePasswordOutput: Codable {
enum CodingKeys: String, CodingKey {
case httpResponse = "httpResponse"
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ConfirmDeviceOutputResponse+Codable.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ConfirmDeviceOutputResponse+Codable.swift
index 506019334d..2cb298d4a5 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ConfirmDeviceOutputResponse+Codable.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ConfirmDeviceOutputResponse+Codable.swift
@@ -8,7 +8,7 @@
import AWSCognitoIdentityProvider
import ClientRuntime
-extension ConfirmDeviceOutputResponse: Codable {
+extension ConfirmDeviceOutput: Codable {
enum CodingKeys: Swift.String, Swift.CodingKey {
case userConfirmationNecessary = "UserConfirmationNecessary"
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/DeleteUserOutputResponse+Codable.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/DeleteUserOutputResponse+Codable.swift
index ff50176089..f8ee9da2c6 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/DeleteUserOutputResponse+Codable.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/DeleteUserOutputResponse+Codable.swift
@@ -8,7 +8,7 @@
import AWSCognitoIdentityProvider
import ClientRuntime
-extension DeleteUserOutputResponse: Codable {
+extension DeleteUserOutput: Codable {
public init(from decoder: Swift.Decoder) throws {
self.init()
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ForgotPasswordOutputResponse+Codable.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ForgotPasswordOutputResponse+Codable.swift
index 699bfe9513..ab21746125 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ForgotPasswordOutputResponse+Codable.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/ForgotPasswordOutputResponse+Codable.swift
@@ -8,7 +8,7 @@
import AWSCognitoIdentityProvider
import ClientRuntime
-extension ForgotPasswordOutputResponse: Codable {
+extension ForgotPasswordOutput: Codable {
enum CodingKeys: Swift.String, Swift.CodingKey {
case codeDeliveryDetails = "CodeDeliveryDetails"
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GetCredentialsForIdentityOutputResponse+Codable.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GetCredentialsForIdentityOutputResponse+Codable.swift
index 89c83bb47e..05b56dcaf9 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GetCredentialsForIdentityOutputResponse+Codable.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GetCredentialsForIdentityOutputResponse+Codable.swift
@@ -8,7 +8,7 @@
import AWSCognitoIdentity
import ClientRuntime
-extension GetCredentialsForIdentityOutputResponse: Codable {
+extension GetCredentialsForIdentityOutput: Codable {
enum CodingKeys: Swift.String, Swift.CodingKey {
case credentials = "Credentials"
case identityId = "IdentityId"
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GetIdOutputResponse+Codable.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GetIdOutputResponse+Codable.swift
index fd9dcb0bc6..2180ce9402 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GetIdOutputResponse+Codable.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GetIdOutputResponse+Codable.swift
@@ -8,7 +8,7 @@
import AWSCognitoIdentity
import ClientRuntime
-extension GetIdOutputResponse: Codable {
+extension GetIdOutput: Codable {
enum CodingKeys: Swift.String, Swift.CodingKey {
case identityId = "IdentityId"
}
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GlobalSignOutOutputResponse+Codable.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GlobalSignOutOutputResponse+Codable.swift
index 5b6d292201..4bcd8a68aa 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GlobalSignOutOutputResponse+Codable.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/GlobalSignOutOutputResponse+Codable.swift
@@ -8,7 +8,7 @@
import AWSCognitoIdentityProvider
import ClientRuntime
-extension GlobalSignOutOutputResponse: Codable {
+extension GlobalSignOutOutput: Codable {
public init(from decoder: Swift.Decoder) throws {
self.init()
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/InitiateAuthOutputResponse+Codable.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/InitiateAuthOutputResponse+Codable.swift
index 135694e9c0..5e9eae1202 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/InitiateAuthOutputResponse+Codable.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/InitiateAuthOutputResponse+Codable.swift
@@ -8,7 +8,7 @@
import AWSCognitoIdentityProvider
import ClientRuntime
-extension InitiateAuthOutputResponse: Codable {
+extension InitiateAuthOutput: Codable {
enum CodingKeys: Swift.String, Swift.CodingKey {
case authenticationResult = "AuthenticationResult"
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/RespondToAuthChallengeOutputResponse+Codable.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/RespondToAuthChallengeOutputResponse+Codable.swift
index e22265be17..692887ad89 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/RespondToAuthChallengeOutputResponse+Codable.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/RespondToAuthChallengeOutputResponse+Codable.swift
@@ -8,7 +8,7 @@
import AWSCognitoIdentityProvider
import ClientRuntime
-extension RespondToAuthChallengeOutputResponse: Codable {
+extension RespondToAuthChallengeOutput: Codable {
enum CodingKeys: Swift.String, Swift.CodingKey {
case authenticationResult = "AuthenticationResult"
case challengeName = "ChallengeName"
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/RevokeTokenOutputResponse+Codable.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/RevokeTokenOutputResponse+Codable.swift
index 55e5971fd4..8ba83d4185 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/RevokeTokenOutputResponse+Codable.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/RevokeTokenOutputResponse+Codable.swift
@@ -8,7 +8,7 @@
import AWSCognitoIdentityProvider
import ClientRuntime
-extension RevokeTokenOutputResponse: Codable {
+extension RevokeTokenOutput: Codable {
public init(from decoder: Swift.Decoder) throws {
self.init()
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/SignUpOutputResponse+Codable.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/SignUpOutputResponse+Codable.swift
index 0f49c5d294..e6f9255302 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/SignUpOutputResponse+Codable.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthCodableImplementations/Cognito/Response/SignUpOutputResponse+Codable.swift
@@ -8,7 +8,7 @@
import AWSCognitoIdentityProvider
import ClientRuntime
-extension SignUpOutputResponse: Codable {
+extension SignUpOutput: Codable {
enum CodingKeys: Swift.String, Swift.CodingKey {
case codeDeliveryDetails = "CodeDeliveryDetails"
case userConfirmed = "UserConfirmed"
diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthTestHarnessInput.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthTestHarnessInput.swift
index 0f0b21a54a..bf7d92f287 100644
--- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthTestHarnessInput.swift
+++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/TestHarness/AuthTestHarnessInput.swift
@@ -83,20 +83,19 @@ enum AmplifyAPI {
}
enum CognitoAPI {
- case forgotPassword(CognitoAPIData)
- case signUp(CognitoAPIData)
- case deleteUser(CognitoAPIData)
- case respondToAuthChallenge(CognitoAPIData)
- case getId(CognitoAPIData)
- case getCredentialsForIdentity(CognitoAPIData)
- case confirmDevice(CognitoAPIData)
- case initiateAuth(CognitoAPIData)
- case revokeToken(CognitoAPIData)
- case globalSignOut(CognitoAPIData)
+ case forgotPassword(CognitoAPIData)
+ case signUp(CognitoAPIData)
+ case deleteUser(CognitoAPIData)
+ case respondToAuthChallenge(CognitoAPIData)
+ case getId(CognitoAPIData)
+ case getCredentialsForIdentity(CognitoAPIData)
+ case confirmDevice(CognitoAPIData)
+ case initiateAuth(CognitoAPIData)
+ case revokeToken(CognitoAPIData)
+ case globalSignOut(CognitoAPIData)
}
-struct CognitoAPIData {
+struct CognitoAPIData {
let expectedInput: Input?
- let errorBinding: E.Type
let output: Result