Skip to content

Commit

Permalink
Integ test initial
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonWon Choi committed Sep 4, 2024
1 parent 614e531 commit aef9d20
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push-integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:
on:
push:
branches:
- replace-with-your-branch
- joonwonc/replace-uuid-with-native

jobs:
e2e:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { v4 } from 'uuid';

import { putEvents as clientPutEvents } from '../../../../src/awsClients/pinpoint';
import { record } from '../../../../src/providers/pinpoint/apis';
import { updateEndpoint } from '../../../../src/providers/pinpoint/apis/updateEndpoint';
Expand All @@ -20,7 +18,7 @@ import {
SESSION_STOP_EVENT,
} from '../../../../src/utils/sessionListener';

jest.mock('uuid');
jest.mock('crypto');
jest.mock('../../../../src/awsClients/pinpoint');
jest.mock('../../../../src/providers/pinpoint/utils');
jest.mock('../../../../src/providers/pinpoint/apis/updateEndpoint');
Expand All @@ -32,7 +30,7 @@ describe('Pinpoint Provider API: record', () => {
const mockResolveEndpointId = resolveEndpointId as jest.Mock;
const mockUpdateEndpoint = updateEndpoint as jest.Mock;
const mockBufferPush = jest.fn();
const mockUuid = v4 as jest.Mock;
const mockUuid = crypto.randomUUID as jest.Mock;

beforeEach(() => {
mockUuid.mockReturnValue(uuid);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import { v4 as uuid } from 'uuid';
import { AWSLexProviderOption } from '../../src/lex-v1/types';
import { AWSLexV2ProviderOption } from '../../src/lex-v2/types';

export const generateRandomLexV1Config = (): AWSLexProviderOption => ({
name: uuid(),
alias: uuid(),
region: uuid(),
name: crypto.randomUUID(),
alias: crypto.randomUUID(),
region: crypto.randomUUID(),
});

export const generateRandomLexV2Config = (): AWSLexV2ProviderOption => ({
name: uuid(),
aliasId: uuid(),
botId: uuid(),
region: uuid(),
localeId: uuid(),
name: crypto.randomUUID(),
aliasId: crypto.randomUUID(),
botId: crypto.randomUUID(),
region: crypto.randomUUID(),
localeId: crypto.randomUUID(),
});

0 comments on commit aef9d20

Please sign in to comment.