Commit 1b92ad5
Fix unit test failures in Platform SDK integration
This commit fixes 4 failing unit tests after the Platform SDK integration:
1. Fixed 3 SecretAdapter tests (TestSecretAdapter_SDKMode,
TestSecretAdapter_SDKMode_SecretNotReady,
TestSecretAdapter_SDKMode_SecretVersioning) by adding PlatformConfig
CRD scheme registration. The tests were failing with:
"no kind is registered for the type v4.PlatformConfig in scheme"
2. Fixed TestApplyStandalone panic by adding nil check for sdkRuntime
in getStandaloneStatefulSet. When sdkRuntime is nil (legacy tests),
the function now falls back to getStandaloneStatefulSetLegacy which
uses the pre-SDK implementation.
Changes:
- pkg/splunk/enterprise/secret_adapter_test.go: Import platformv4 and
register PlatformConfig scheme in all SDK-mode tests
- pkg/splunk/enterprise/standalone.go: Add nil check and legacy
fallback path in getStandaloneStatefulSet, add
getStandaloneStatefulSetLegacy function for backward compatibility
All enterprise package tests now pass successfully.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 0cfff27 commit 1b92ad5
2 files changed
Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| |||
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| 222 | + | |
220 | 223 | | |
221 | 224 | | |
222 | 225 | | |
| |||
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
| 298 | + | |
295 | 299 | | |
296 | 300 | | |
297 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
297 | 303 | | |
298 | 304 | | |
299 | 305 | | |
| |||
432 | 438 | | |
433 | 439 | | |
434 | 440 | | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
435 | 462 | | |
436 | 463 | | |
437 | 464 | | |
| |||
0 commit comments