Skip to content

fix: move the CTS around to prepare for multi-languages support #82

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

Merged
merged 5 commits into from
Jan 14, 2022

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented Jan 13, 2022

🧭 What and Why

🎟 JIRA Ticket: APIC-253

Split the CTS into more parts, to allow for more languages, other tests than requests (like client tests) and use the multiplexer script to reduce duplication.

Changes included:

  • Move all CTS to requests folder
  • Move the generation to tests/requests
  • Add separate package.json for the javascript CTS, separated from the generation
  • Create folder and files for java CTS
  • Split the generation script because it was getting too big, and will grow bigger
  • Also updated the dependencies, as I was moving around the packages anyway, and update all sub-dependency.

🧪 Test

Now all CTS operation require to be run inside of docker too, to simplify everything.

@millotp millotp marked this pull request as draft January 13, 2022 08:58
@millotp millotp changed the title move everything fix: move the CTS around to prepare for multi-languages support Jan 13, 2022
@millotp millotp self-assigned this Jan 13, 2022
@millotp millotp force-pushed the fix/use-multiplexer-cts branch from f09e560 to 73692c8 Compare January 13, 2022 10:39
@millotp millotp force-pushed the fix/use-multiplexer-cts branch from 73692c8 to 5b80d36 Compare January 13, 2022 11:13
@millotp millotp marked this pull request as ready for review January 13, 2022 11:18
@millotp millotp requested review from shortcuts and damcou and removed request for shortcuts January 13, 2022 11:18
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Good initiative!

Comment on lines +1 to +7
import fsp from 'fs/promises';

export async function loadRequestsTemplate(language: string): Promise<string> {
return (
await fsp.readFile(`CTS/templates/${language}/requests.mustache`)
).toString();
}
Copy link
Member

Choose a reason for hiding this comment

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

This could be in utils until we have the clients/responses tests

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We already have some with #88, I will leave it here as ground work.

Copy link
Member

Choose a reason for hiding this comment

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

Yep indeed

@shortcuts shortcuts mentioned this pull request Jan 13, 2022
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

This is cool! Nice

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.

2 participants