File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ import os
2
+ from unittest import TestCase
3
+
4
+ from cumulus_lambda_functions .lib .cognito_login .cognito_token_retriever import CognitoTokenRetriever
5
+ from cumulus_lambda_functions .lib .constants import Constants
6
+
7
+
8
+ class TestCognitoTokenRetriever (TestCase ):
9
+ def test_param_store_01 (self ):
10
+ # os.environ['AWS_ACCESS_KEY_ID'] = 'dd'
11
+ # os.environ['AWS_SECRET_ACCESS_KEY'] = 'ddd'
12
+ # os.environ['AWS_SESSION_TOKEN'] = 'ddd'
13
+ # os.environ['AWS_REGION'] = 'us-west-2'
14
+
15
+
16
+ os .environ [Constants .USERNAME ] = '/unity/uds/user/wphyo/username'
17
+ os .environ [Constants .PASSWORD ] = '/unity/uds/user/wphyo/dwssap'
18
+ # os.environ[Constants.USERNAME] = 'usps_username'
19
+ # os.environ[Constants.PASSWORD] = 'usps_password'
20
+ os .environ [Constants .PASSWORD_TYPE ] = Constants .PARAM_STORE
21
+ os .environ [Constants .CLIENT_ID ] = '7a1fglm2d54eoggj13lccivp25' # JPL Cloud
22
+ os .environ [Constants .CLIENT_ID ] = '6ir9qveln397i0inh9pmsabq1' # MCP Test Cloud
23
+
24
+ os .environ [Constants .COGNITO_URL ] = 'https://cognito-idp.us-west-2.amazonaws.com'
25
+ result = CognitoTokenRetriever ().start ()
26
+ self .assertTrue (len (result ) > 0 , 'empty token' )
27
+ return
You can’t perform that action at this time.
0 commit comments