From 67357d0bc3bd4b4d438c46f6ed33ed33e3ffc8e8 Mon Sep 17 00:00:00 2001 From: Andreas Hilbig Date: Sat, 31 Jan 2026 11:46:02 +0100 Subject: [PATCH] feat: implement smoketest and extend host provisioning with template linking - Add runSmoketest mutation to automate end-to-end verification. - Add SmoketestExecutor and HostDeleter to support automated testing and cleanup. - Extend createHost and importHosts to allow linking templates by name or ID. - Update docs/howtos/cookbook.md with new recipe steps and AI/MCP guidance. - Update .junie/guidelines.md with new verification and deployment standards. - Add src/test/template_link.test.ts and update existing tests to cover new functionality. - Regenerate GraphQL types to match schema updates. --- .idea/workspace.xml | 20 +-- .junie/guidelines.md | 13 +- docs/howtos/cookbook.md | 11 +- docs/howtos/maintenance.md | 8 +- mcp/operations/createHost.graphql | 4 +- mcp/operations/createVerificationHost.graphql | 5 +- mcp/operations/importHosts.graphql | 1 + mcp/operations/runSmoketest.graphql | 14 ++ schema/mutations.graphql | 84 +++++++++- src/api/resolvers.ts | 37 +++- src/datasources/zabbix-hostgroups.ts | 5 + src/datasources/zabbix-hosts.ts | 6 + src/datasources/zabbix-templates.ts | 23 ++- src/execution/host_deleter.ts | 110 ++++++++++++ src/execution/host_importer.ts | 50 ++++-- src/execution/smoketest_executor.ts | 158 ++++++++++++++++++ src/schema/generated/graphql.ts | 87 +++++++++- src/test/host_importer.test.ts | 4 +- src/test/host_integration.test.ts | 5 +- src/test/template_link.test.ts | 95 +++++++++++ 20 files changed, 690 insertions(+), 50 deletions(-) create mode 100644 mcp/operations/runSmoketest.graphql create mode 100644 src/execution/host_deleter.ts create mode 100644 src/execution/smoketest_executor.ts create mode 100644 src/test/template_link.test.ts diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c161fad..4fc0c1d 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,17 +5,12 @@ - - - - - - - - - - + + + + + - @@ -215,7 +210,8 @@ - + +