Skip to content

トークン取得のテストのスキップや、ciでの実行を行うようにする。 #3

@ushios

Description

@ushios

主にこういったテスト

public void testFetchTokenWithSrpAuth() throws Exception {
String cognitoUserPoolId = System.getenv("TEST_COGNITO_USER_POOL_ID");
String cognitoClientId = System.getenv("TEST_COGNITO_CLIENT_ID");
String username = System.getenv("TEST_COGNITO_USERNAME");
String password = System.getenv("TEST_COGNITO_PASSWORD");
FetchCognitoToken fetchCognitoToken = new FetchCognitoToken(cognitoUserPoolId, cognitoClientId);
fetchCognitoToken.setAuthParameters(username, password);
Token token = fetchCognitoToken.fetchTokenWithSrpAuth();
assertNotNull(token.getIdToken());
assertNotNull(token.getRefreshToken());
}

に関して、環境変数がない場合はテスト自体を実行しない。

また、github actionsのテストでは環境変数を指定し実行されることを確認したい。

  • 環境変数がない場合はテスト実行され、環境ヘンスがある場合はテストが実行されるようにする。
  • Github Actions上でもこのテストを動くようにする。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions