@@ -3,16 +3,12 @@ import { TestProjectBase } from './test_project_base.js';
3
3
import { TestProjectCreator } from './test_project_creator.js' ;
4
4
import { AmplifyClient } from '@aws-sdk/client-amplify' ;
5
5
import { e2eToolingClientConfig } from '../e2e_tooling_client_config.js' ;
6
- import {
7
- CognitoIdentityProviderClient ,
8
- ListUsersCommand ,
9
- } from '@aws-sdk/client-cognito-identity-provider' ;
6
+ import { CognitoIdentityProviderClient } from '@aws-sdk/client-cognito-identity-provider' ;
10
7
import {
11
8
AttachRolePolicyCommand ,
12
9
CreatePolicyCommand ,
13
10
IAMClient ,
14
11
} from '@aws-sdk/client-iam' ;
15
- import { DeployedResourcesFinder } from '../find_deployed_resource.js' ;
16
12
import fsp from 'fs/promises' ;
17
13
import assert from 'node:assert' ;
18
14
import { createEmptyAmplifyProject } from './create_empty_amplify_project.js' ;
@@ -54,7 +50,6 @@ export class SeedTestProjectCreator implements TestProjectCreator {
54
50
private readonly iamClient : IAMClient = new IAMClient (
55
51
e2eToolingClientConfig
56
52
) ,
57
- private readonly resourceFinder : DeployedResourcesFinder = new DeployedResourcesFinder ( ) ,
58
53
private readonly stsClient : STSClient = new STSClient (
59
54
e2eToolingClientConfig
60
55
)
@@ -72,7 +67,6 @@ export class SeedTestProjectCreator implements TestProjectCreator {
72
67
this . amplifyClient ,
73
68
this . cognitoIdentityProviderClient ,
74
69
this . iamClient ,
75
- this . resourceFinder ,
76
70
this . stsClient
77
71
) ;
78
72
await fsp . cp (
@@ -104,7 +98,6 @@ class SeedTestProject extends TestProjectBase {
104
98
amplifyClient : AmplifyClient ,
105
99
private readonly cognitoIdentityProviderClient : CognitoIdentityProviderClient ,
106
100
private readonly iamClient : IAMClient ,
107
- private readonly resourceFinder : DeployedResourcesFinder ,
108
101
private readonly stsClient : STSClient
109
102
) {
110
103
super (
@@ -173,28 +166,6 @@ class SeedTestProject extends TestProjectBase {
173
166
const testUsername = '[email protected] ' ;
174
167
const clientConfig = await generateClientConfig ( backendId , '1.3' ) ;
175
168
176
- const cognitoId = await this . resourceFinder . findByBackendIdentifier (
177
- backendId ,
178
- 'AWS::Cognito::UserPool' ,
179
- ( ) => true
180
- ) ;
181
-
182
- const users = await this . cognitoIdentityProviderClient . send (
183
- new ListUsersCommand ( {
184
- UserPoolId : cognitoId [ 0 ] ,
185
- Filter : '"email"^="testUser"' ,
186
- AttributesToGet : [ 'email' ] ,
187
- } )
188
- ) ;
189
-
190
- if ( users . Users && users . Users . length < 1 ) {
191
- throw new Error ( 'Users are missing' ) ;
192
- }
193
-
194
- assert . ok ( users . Users ) ;
195
- assert . ok ( users . Users [ 0 ] . Attributes ) ;
196
- assert . strictEqual ( users . Users [ 0 ] . Attributes [ 0 ] ! . Value , testUsername ) ;
197
-
198
169
if ( ! clientConfig . auth ) {
199
170
throw new Error ( 'Client config missing auth section' ) ;
200
171
}
0 commit comments