-
Notifications
You must be signed in to change notification settings - Fork 77
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
Creating CLI e2e tests #2494
Creating CLI e2e tests #2494
Conversation
ff80712
to
d71e65b
Compare
request.Header.Set("Content-Type", contentType) | ||
request.Header.Set("Accept", contentType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that correct? We expect the same value for Content-Type and Accept? Doesn't this go against the PR Sebastian opened to support different content types for inputs and outputs of the API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because with that we are saying "we expect the same input and output contentType from the API", on future versions we have the idea of sending yaml and handling the output with the --output-format
flag that the user uses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for future referece, if you don't need different request and response content types, you can pass just one (either) header and everything falls back to that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! I will revisit this decision and start using different Content-Type
and Accept
after we visit the PR #2523 .
In the future, the main idea is that the backend should be responsible for formatting entities to avoid replication of the same logic and both CLI and Backend.
* Moving CLI and Server external tests to 'testing' folder * wip - First draft of e2e test * Structuring tests * Adding cli e2e tests on CI * Fixing e2e tests * Updating CI command * Improved internal CLI e2e structure * Update Github action script * Fixing runtime * Adding tests and fixing error on CLI * Fixing apply command * Fixing test behavior * Fixing test * Adding command to avoid test cache * Fix datastore to consider new behavior * Updated tests
This PR adds a PoC for CLI e2e tests on Tracetest.
To run these tests locally, you can run the following commands:
Or, if you want to run with your local compilation:
Loom: https://www.loom.com/share/92fe592a94614b57a85fd0715f1c9293
Changes
DataStores
,version
andhelp
commandsFixes
apply
command, that was not consideringyaml
when parsing a datastoreChecklist