Skip to content

Commit

Permalink
chore: breakpoint for android test
Browse files Browse the repository at this point in the history
  • Loading branch information
phani-srikar committed Jul 15, 2023
1 parent 3c2649a commit 8c86150
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions .codebuild/e2e_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ batch:
variables:
TEST_SUITE: src/__tests__/build-app-android.test.ts
CLI_REGION: ap-northeast-1
debug-session: true
depend-on:
- publish_to_local_registry
# - identifier: cleanup_e2e_resources
Expand Down
1 change: 1 addition & 0 deletions .codebuild/run_e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ phases:
build:
commands:
- source ./shared-scripts.sh && _runE2ETestsLinux
- codebuild-breakpoint
post_build:
commands:
- aws sts get-caller-identity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ describe('build app - Android', () => {
});

afterAll(async () => {
rmSync(path.join(projectRoot, 'amplify'), { recursive: true, force: true });
// rmSync(path.join(projectRoot, 'amplify'), { recursive: true, force: true });
});

afterEach(() => {
rmSync(path.join(projectRoot, modelDir), { recursive: true, force: true });
// rmSync(path.join(projectRoot, modelDir), { recursive: true, force: true });
});

Object.entries(schemas).forEach(([schemaName, schema]) => {
Expand All @@ -39,7 +39,7 @@ describe('build app - Android', () => {
const schemaText = `input AMPLIFY { globalAuthRule: AuthRule = { allow: public } }\n${schema.sdl}`;
updateApiSchemaWithText(projectRoot, apiName, schemaText);
await generateModels(projectRoot);
await androidBuild(projectRoot, { ...config });
// await androidBuild(projectRoot, { ...config });
};
if (skip.has(schemaName)) {
it.skip(testName, testFunction);
Expand All @@ -48,11 +48,11 @@ describe('build app - Android', () => {
}
});

it('fails build with syntax error', async () => {
// @ts-ignore
updateApiSchemaWithText(projectRoot, apiName, Object.values(schemas)[0].sdl);
await generateModels(projectRoot);
await writeFileSync(path.join(projectRoot, modelDir, 'AmplifyModelProvider.java'), 'foo\nbar');
await expect(androidBuild(projectRoot, { ...config })).rejects.toThrowError();
});
// it('fails build with syntax error', async () => {
// // @ts-ignore
// updateApiSchemaWithText(projectRoot, apiName, Object.values(schemas)[0].sdl);
// await generateModels(projectRoot);
// await writeFileSync(path.join(projectRoot, modelDir, 'AmplifyModelProvider.java'), 'foo\nbar');
// await expect(androidBuild(projectRoot, { ...config })).rejects.toThrowError();
// });
});
Empty file modified scripts/view-test-artifacts.sh
100644 → 100755
Empty file.

0 comments on commit 8c86150

Please sign in to comment.