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

feat(test): Add unit tests for aicore-clients #12

Merged
merged 16 commits into from
Jul 19, 2024
Merged

Conversation

shibeshduw
Copy link
Contributor

@shibeshduw shibeshduw commented Jul 8, 2024

Adds unit tests for the AI core clients generated by using Cloud SDK. The following 5 AI Core endpoints covered:

  • Artifact
  • Configuration
  • Deployment
  • Execution
  • Scenario

Closes AI/gen-ai-hub-sdk-js#47

@shibeshduw shibeshduw requested a review from deekshas8 July 9, 2024 12:11

nock(destination.url).get('/lm/artifacts').reply(200, expectedResponse, {
'Content-Type': 'application/json',
'AI-Resource-Group': 'default'
Copy link
Contributor

Choose a reason for hiding this comment

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

[q] Aren't these part of the request header?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. The resource group is only a part of the request header. Only content type should be a part of response. Thanks for catching it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would also not bother so much with response headers for now.

@shibeshduw shibeshduw merged commit 8814496 into main Jul 19, 2024
9 checks passed
@shibeshduw shibeshduw deleted the ai-core-client-tests branch July 19, 2024 09:04
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