Skip to content

test: add missing unit tests for adk and core packages - #2520

Open
yashrajshuklaaa wants to merge 4 commits into
kagent-dev:mainfrom
yashrajshuklaaa:chore/add-missing-tests
Open

test: add missing unit tests for adk and core packages#2520
yashrajshuklaaa wants to merge 4 commits into
kagent-dev:mainfrom
yashrajshuklaaa:chore/add-missing-tests

Conversation

@yashrajshuklaaa

Copy link
Copy Markdown
Contributor

Test-only change adding unit test coverage for -

  • go/adk/pkg/auth/token_test.go
  • go/adk/pkg/runner/adapter_test.go (+ testdata/config_openai.json, testdata/mock_openai.json)
  • go/core/internal/controller/reconciler/status/mcp_server_test.go
  • go/core/internal/controller/reconciler/utils/reconciler_utils_test.go
  • go/core/internal/controller/translator/mutate_test.go
  • go/core/internal/service/agent/service_test.go
  • go/core/internal/service/agent/validator_test.go

No production code changes.
All tests pass locally (go test ./...)

… reconciler, reconciler utils

Signed-off-by: Yashraj Shukla <shuklayashraj68@gmail.com>
@yashrajshuklaaa
yashrajshuklaaa requested review from a team and supreme-gg-gg as code owners August 21, 2026 23:27
@github-actions github-actions Bot added the testing Additional testing required label Aug 21, 2026
@yashrajshuklaaa
yashrajshuklaaa force-pushed the chore/add-missing-tests branch 2 times, most recently from bff00a2 to c06a3f0 Compare August 22, 2026 00:10
assert.True(t, serviceerrors.IsCode(err, serviceerrors.CodePermissionDenied))
}

func assertAnError() error {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

name says assert, but this just builds an error. confusing name.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed :) @mesutoezdil
PTAL

Spec: v1alpha3.SandboxAgentSpec{
Type: v1alpha3.AgentType_Declarative,
Declarative: &v1alpha3.DeclarativeAgentSpec{
// ModelConfig deliberately omitted / points at a ModelConfig

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

comment says omitted, but code sets it to a missing name. pick one wording.

@yashrajshuklaaa yashrajshuklaaa Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

resolved! thanks for the suggestion.

Signed-off-by: Yashraj Shukla <shuklayashraj68@gmail.com>
…CreateRunnerConfig via mockllm)

Signed-off-by: Yashraj Shukla <shuklayashraj68@gmail.com>
Signed-off-by: Yashraj Shukla <shuklayashraj68@gmail.com>
@yashrajshuklaaa
yashrajshuklaaa force-pushed the chore/add-missing-tests branch from c06a3f0 to baa973f Compare August 25, 2026 03:33
@yashrajshuklaaa

Copy link
Copy Markdown
Contributor Author

@EItanya PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Additional testing required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants