Tests in mcpserver package fail due to missing policies and frameworks
Author: Rucha0901Created Sep 11, 2026Updated Sep 11, 2026
Description
Running go test ./... causes failures in github.com/kubescape/kubescape/v4/cmd/mcpserver because it cannot find the nsa framework and the C-0017 control. TestIaCScan_ValidPath and TestIaCScan_Controls are specifically affected.
Environment
OS: Ubuntu (CI environment)
Version: main
Steps To Reproduce
- Ensure the
~/.kubescapepolicy cache is empty. - Run
go test ./cmd/mcpserver/...
Expected behavior
The test environment mocks or downloads the required policies so the tests pass reliably in CI.
Actual Behavior
Tests fail with errors indicating that the nsa framework and C-0017 control are not found.
Additional context
N/A
Source: kubescape/kubescape