Skip to content

Conversation

egorpavlikhin
Copy link
Contributor

Introduces simple integration tests for tools. The goals for these test are:

  • Reach out to a real instance and make sure the API response is parsed correctly
  • Verify errors are handled as expected (the next step I want to take is improve error handling so models can more easily reason about the specific errors our API returns)
  • Make it easier to refactor the implementation without introducing regression bugs

@@ -0,0 +1,3 @@
import packageJson from "../../package.json" with { type: "json" };

export const SEMVER_VERSION = packageJson.version; No newline at end of file
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is required to avoid circular dependency between src/index.ts and getClientConfigurationFromEnvironment.ts

import { testConfig, parseToolResponse } from "./testSetup.js";
import { listTenantsHandler } from "../listTenants.js";

describe("listTenants Integration Tests", () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not too much value in these tests but they do make it easier to make changes and quickly checks that things are not completely broken.

joe10832

This comment was marked as spam.

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