Context
#195 introduced the elastic kb command group with 48 API namespaces generated from the Kibana OpenAPI spec. The implementation is covered by 20 unit tests for the KibanaClient layer and was validated E2E manually against Kibana 9.3.3 (data-views CRUD, alerting rules, connectors).
There are currently no automated functional tests (integration-level) for KB commands, unlike the ES side which generates bash tests from YAML fixtures.
What needs to happen
1. CI infrastructure
- Add a Kibana Docker container to the Buildkite pipeline (Kibana requires ES to be running first)
- Configure auth (reuse ES credentials with basic auth) and wait-for-ready health check (
/api/status)
2. Hand-authored functional tests
- Write bash functional tests for a representative subset of KB namespaces:
data-views: create, get, list, delete
spaces: create, get, list, delete
alerting: create rule, find rules, delete rule
connectors: list connector types, create connector, delete connector
saved-objects: export, import
- Tests should follow the same
set -euo pipefail + elastic --json + jq assertion pattern used by ES functional tests
3. Known issues to account for
- Some generated commands have required params that should be optional (e.g.
spaces get-spaces-space requires include_authorized_purposes) -- these are codegen issues to fix in elastic-client-generator-js before testing
- Kibana API ordering dependencies are more complex than ES (e.g. connectors need a valid type, alerting rules need a valid rule type and action)
Out of scope (for now)
- Auto-generating KB functional tests from a machine-readable spec (Kibana doesn't publish YAML test fixtures like ES does)
- Full coverage of all 48 namespaces -- start with the 5 listed above, expand over time
Context
#195 introduced the
elastic kbcommand group with 48 API namespaces generated from the Kibana OpenAPI spec. The implementation is covered by 20 unit tests for theKibanaClientlayer and was validated E2E manually against Kibana 9.3.3 (data-views CRUD, alerting rules, connectors).There are currently no automated functional tests (integration-level) for KB commands, unlike the ES side which generates bash tests from YAML fixtures.
What needs to happen
1. CI infrastructure
/api/status)2. Hand-authored functional tests
data-views: create, get, list, deletespaces: create, get, list, deletealerting: create rule, find rules, delete ruleconnectors: list connector types, create connector, delete connectorsaved-objects: export, importset -euo pipefail+elastic --json+jqassertion pattern used by ES functional tests3. Known issues to account for
spaces get-spaces-spacerequiresinclude_authorized_purposes) -- these are codegen issues to fix inelastic-client-generator-jsbefore testingOut of scope (for now)