Skip to content

Commit

Permalink
feat: #60 merge remote main and fix unit tests (#68)
Browse files Browse the repository at this point in the history
Fixes #60, merged remote main and fix tests
  • Loading branch information
psrebniak authored Dec 14, 2023
1 parent e602e38 commit 20ff8dc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions test/salesforce/destination.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
import { Stack } from 'aws-cdk-lib';
import { SecretValue, Stack } from 'aws-cdk-lib';
import { Template } from 'aws-cdk-lib/assertions';
import { Bucket } from 'aws-cdk-lib/aws-s3';

Expand Down Expand Up @@ -117,10 +117,10 @@ describe('SalesforceDestination', () => {
const secret = Secret.fromSecretNameV2(stack, 'TestSecret', 'appflow/salesforce/client');
const profile = new SalesforceConnectorProfile(stack, 'TestProfile', {
oAuth: {
accessToken: 'accessToken',
accessToken: SecretValue.unsafePlainText('accessToken'),
flow: {
refreshTokenGrant: {
refreshToken: 'refreshToken',
refreshToken: SecretValue.unsafePlainText('refreshToken'),
client: secret,
},
},
Expand Down
14 changes: 7 additions & 7 deletions test/salesforce/profile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
import { Stack } from 'aws-cdk-lib';
import { SecretValue, Stack } from 'aws-cdk-lib';
import { Template } from 'aws-cdk-lib/assertions';
import { Key } from 'aws-cdk-lib/aws-kms';
import { Secret } from 'aws-cdk-lib/aws-secretsmanager';
Expand All @@ -18,10 +18,10 @@ describe('SalesforceConnectorProfileProps', () => {

new SalesforceConnectorProfile(stack, 'TestProfile', {
oAuth: {
accessToken: 'accessToken',
accessToken: SecretValue.unsafePlainText('accessToken'),
flow: {
refreshTokenGrant: {
refreshToken: 'refreshToken',
refreshToken: SecretValue.unsafePlainText('refreshToken'),
client: clientSecret,
},
},
Expand Down Expand Up @@ -58,10 +58,10 @@ describe('SalesforceConnectorProfileProps', () => {

new SalesforceConnectorProfile(stack, 'TestProfile', {
oAuth: {
accessToken: secret.secretValueFromJson('accessToken').toString(),
accessToken: secret.secretValueFromJson('accessToken'),
flow: {
refreshTokenGrant: {
refreshToken: secret.secretValueFromJson('refreshToken').toString(),
refreshToken: secret.secretValueFromJson('refreshToken'),
client: secret,
},
},
Expand Down Expand Up @@ -135,10 +135,10 @@ describe('SalesforceConnectorProfileProps', () => {
new SalesforceConnectorProfile(stack, 'TestProfile', {
key: key,
oAuth: {
accessToken: secret.secretValueFromJson('accessToken').toString(),
accessToken: secret.secretValueFromJson('accessToken'),
flow: {
refreshTokenGrant: {
refreshToken: secret.secretValueFromJson('refreshToken').toString(),
refreshToken: secret.secretValueFromJson('refreshToken'),
client: secret,
},
},
Expand Down
6 changes: 3 additions & 3 deletions test/salesforce/source.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
import { Stack } from 'aws-cdk-lib';
import { SecretValue, Stack } from 'aws-cdk-lib';
import { Template } from 'aws-cdk-lib/assertions';
import { Bucket } from 'aws-cdk-lib/aws-s3';

Expand Down Expand Up @@ -112,10 +112,10 @@ describe('SalesforceSource', () => {
const secret = Secret.fromSecretNameV2(stack, 'TestSecret', 'appflow/salesforce/client');
const profile = new SalesforceConnectorProfile(stack, 'TestProfile', {
oAuth: {
accessToken: 'accessToken',
accessToken: SecretValue.unsafePlainText('accessToken'),
flow: {
refreshTokenGrant: {
refreshToken: 'refreshToken',
refreshToken: SecretValue.unsafePlainText('refreshToken'),
client: secret,
},
},
Expand Down

0 comments on commit 20ff8dc

Please sign in to comment.