Skip to content

test(kiali): contract tests#617

Merged
manusa merged 11 commits intocontainers:mainfrom
josunect:kiali_contract_tests
Jan 16, 2026
Merged

test(kiali): contract tests#617
manusa merged 11 commits intocontainers:mainfrom
josunect:kiali_contract_tests

Conversation

@josunect
Copy link
Contributor

@josunect josunect commented Dec 23, 2025

Automated Consistency Tests: Verify MCP Tool Definitions against Kiali API Routes

How do we know that APIs used by the consumer (kiali mcp) still exist and return what it expects?

  • Kiali mcp declares what is using
  • It is expected to run these tests by Kiali to verify those expectations in CI

Contract tests keep coupling low because they only describe:

  • endpoints
  • request/responses
  • status codes

TODO:

Signed-off-by: josunect <jcordoba@redhat.com>
Signed-off-by: josunect <jcordoba@redhat.com>
Signed-off-by: josunect <jcordoba@redhat.com>
Signed-off-by: josunect <jcordoba@redhat.com>
Signed-off-by: josunect <jcordoba@redhat.com>
Signed-off-by: josunect <jcordoba@redhat.com>
Signed-off-by: josunect <jcordoba@redhat.com>
Signed-off-by: josunect <jcordoba@redhat.com>
@josunect josunect marked this pull request as ready for review January 7, 2026 16:31
Signed-off-by: josunect <jcordoba@redhat.com>
@josunect josunect closed this Jan 8, 2026
@josunect josunect reopened this Jan 8, 2026
Copy link
Contributor

@aljesusg aljesusg left a comment

Choose a reason for hiding this comment

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

LGFM

@aljesusg
Copy link
Contributor

cc @Cali0707 Can we merge this test validation?

Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

This seems reasonable. However, I fail to see why the backend tests are maintained here if they are executed from a different repo.

@josunect
Copy link
Contributor Author

This seems reasonable. However, I fail to see why the backend tests are maintained here if they are executed from a different repo.

That's because they are testing the endpoints implemented by the other repo (Maintained by the same team). So, if any endpoint is modified, the tests will fail, and the way to fix it would be:

  • Or update the endpoints used by Kiali MCP accordingly (And the tests)
  • Or version the Kiali endpoints to keep compatibility and don't break the Kiali MCP

@manusa manusa added this to the 0.1.0 milestone Jan 12, 2026
@manusa manusa changed the title test(Kiali): contract tests test(kiali): contract tests Jan 12, 2026
@manusa manusa requested a review from Cali0707 January 16, 2026 14:38
@@ -0,0 +1,683 @@
//go:build contract
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: can we make this something like kiali-contract ? Just to be a bit more explicit about which contract we are testing

Signed-off-by: josunect <jcordoba@redhat.com>
Signed-off-by: josunect <jcordoba@redhat.com>
@manusa manusa merged commit 4fe6d9a into containers:main Jan 16, 2026
6 checks passed
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