Skip to content

[module-sdk] Add functional testing framework, enhance unit tests#50

Merged
ldmonster merged 4 commits into
mainfrom
feat/testing-framework
May 7, 2026
Merged

[module-sdk] Add functional testing framework, enhance unit tests#50
ldmonster merged 4 commits into
mainfrom
feat/testing-framework

Conversation

@ldmonster
Copy link
Copy Markdown
Collaborator

@ldmonster ldmonster commented Jun 11, 2025

Summary

  • Introduces a two-package testing library under testing/ for writing hook tests without a real Kubernetes cluster, addon-operator, or shell-operator.
  • testing/helpers — lightweight unit-test building blocks: InputBuilder, StaticSnapshots, RecordingPatchCollector, NewValues*, and JQRunOn*.
  • testing/framework — a deckhouse-style functional test harness with a fake dynamic Kubernetes client, snapshot generation from KubernetesConfig bindings, patch replay, and full hook pipeline execution.
  • Migrates existing tests in common-hooks/ and examples/ from Ginkgo suites to plain *testing.T + testify, adopting the new layers.
  • Adds comprehensive documentation: TESTING.md (project-wide guide), testing/README.md, testing/framework/README.md, and testing/helpers/README.md.

@ldmonster ldmonster self-assigned this Jun 11, 2025
@ldmonster ldmonster added the enhancement New feature or request label Jun 11, 2025
@ldmonster ldmonster force-pushed the feat/testing-framework branch from eeb781c to 36eb8e1 Compare May 7, 2026 08:47
ldmonster added 3 commits May 7, 2026 12:15
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
@ldmonster ldmonster force-pushed the feat/testing-framework branch from 36eb8e1 to 004da15 Compare May 7, 2026 09:16
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
@ldmonster ldmonster changed the title [module-sdk] Add testing framework [module-sdk] Add functional testing framework, enhance unit tests May 7, 2026
@ldmonster ldmonster merged commit 9fc7b3e into main May 7, 2026
26 checks passed
@ldmonster ldmonster deleted the feat/testing-framework branch May 7, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants