-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Add AI Core e2e tests #128
Conversation
tests/e2e-tests/src/ai-api.test.ts
Outdated
}, 180000); | ||
|
||
it('should modify the deployment to stop it', async () => { | ||
expect(createdDeploymentId).toBeDefined(); |
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.
[pp] I think it would be better if we could have a way to run the tests independently. In case something is not working, I would always have to run all tests in order, so local testing is a bit difficult: I couldn't run one test at a time...
My thoughts:
-
I expect that we have no running deployments before we run the tests. This means when I would like to run the modification or deletion test, I couldn't run this test individually.
A fix could be that I have to run the creation manually before (e.g. running the creation test) and then to run modification individually, query the deployment instead of keeping a global state.
This is still inconvenient, so the tests could try to retrieve the global state, if not set query the deployment, if not there create it as needed. -
Another thought is - if tests fail or are cancelled before they are finished, it is possible that we accumulate more and more deployments - I guess we should consider some kind of a clean up step.
I guess 1. could be a bit overkill or could be done later. I think 2. could be useful.
Thoughts @deekshas8 @MatKuhr @ZhongpinWang @KavithaSiva @tomfrenken
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.
Maybe we could use jest's pattern matching to run individual tests but also keep this flow? Plus we also add a cleanup step as you mentioned.
) | ||
}); | ||
|
||
function getDeploymentId(id: string | undefined): string { |
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.
I assume the idea here is that later on this can be used to fetch a deployment ID in case it does not exist, right?
Context
Added e2e test flow for
DeploymentApi
that covers starting a deployment(POST), stopping a deployment(PATCH) and deleting a deployment(DELETE), along with a precondition and postcondition check(GET).Test run: https://github.com/SAP/ai-sdk-js/actions/runs/10811128561
Closes: AI/gen-ai-hub-sdk-js-backlog#59.
Definition of Done
[ ] Documentation updated[ ] (Optional) Aligned changes with the Java SDK[ ] (Optional) Release notes updated