Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Refactor orchestration E2E tests for better coverage #160

Merged
merged 16 commits into from
Oct 2, 2024

Conversation

MatKuhr
Copy link
Member

@MatKuhr MatKuhr commented Sep 20, 2024

Context

This PR improves the E2E test coverage for orchestration. In doing so, it asserts that the sample code is functional.

Definition of Done

  • Code is tested (Unit, E2E)
  • Error handling created / updated & covered by the tests above
  • Documentation updated
  • (Optional) Aligned changes with the Java SDK
  • (Optional) Release notes updated

Copy link
Contributor

@marikaner marikaner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check whether the smoke tests still work on this? You can just run the action for this branch.

sample-code/src/server.ts Outdated Show resolved Hide resolved
sample-code/src/server.ts Outdated Show resolved Hide resolved
templating: {
template: [
// define "country" as variable by wrapping it with "{{? ... }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I like these additional comments for samples!

sample-code/src/orchestration.ts Outdated Show resolved Hide resolved
sample-code/src/orchestration.ts Outdated Show resolved Hide resolved
sample-code/src/orchestration.ts Outdated Show resolved Hide resolved
sample-code/src/server.ts Outdated Show resolved Hide resolved
tests/e2e-tests/src/orchestration.test.ts Show resolved Hide resolved
tests/e2e-tests/src/orchestration.test.ts Show resolved Hide resolved
tests/e2e-tests/src/orchestration.test.ts Show resolved Hide resolved
@MatKuhr
Copy link
Member Author

MatKuhr commented Sep 23, 2024

Smoke tested

packages/orchestration/README.md Outdated Show resolved Hide resolved
tests/e2e-tests/src/orchestration.test.ts Show resolved Hide resolved
sample-code/src/orchestration.ts Outdated Show resolved Hide resolved
@MatKuhr MatKuhr enabled auto-merge (squash) September 26, 2024 09:03
Copy link
Contributor

@ZhongpinWang ZhongpinWang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

} catch (error: any) {
// Handle the case where the output was filtered.
return `Error: ${error.message}`;
if (error.response.status === 400) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[pp] Also, typecheck if error instanceof Error. Ideally, we should also check if it is an AxiosError as we are assuming it's structure. But, I guess this would lead to adding a new dependency.

@MatKuhr MatKuhr merged commit ac10b81 into main Oct 2, 2024
8 checks passed
@MatKuhr MatKuhr deleted the chore/refactor-orchestration-e2e-tests branch October 2, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants