Kubernetes Executor Unit Tests Fail
@Denish3436 is already working on this.
Since May 29, 2025.
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 364
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 84
Description
What happened:
FAIL: TestExecutor_ensureSync (4.43s)
sync_test.go:266:
Error Trace: /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:266
Error: Not equal:
expected: "STAGE_SUCCESS"
actual : "STAGE_FAILURE"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-STAGE_SUCCESS
+STAGE_FAILURE
Test: TestExecutor_ensureSync
sync_test.go:273:
Error Trace: /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:273
Error: Received unexpected error:
deployments.apps "simple" not found
Test: TestExecutor_ensureSync
--- FAIL: TestDeleteResources (0.00s)
controller.go:97: missing call(s) to *kubernetestest.MockApplier.Delete(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:640
controller.go:97: missing call(s) to *kubernetestest.MockApplier.Delete(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:612
controller.go:97: missing call(s) to *kubernetestest.MockApplier.Delete(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:626
controller.go:97: aborting test due to missing call(s)
--- FAIL: TestApplyManifests (0.00s)
controller.go:97: missing call(s) to *kubernetestest.MockApplier.ApplyManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:446
controller.go:97: missing call(s) to *kubernetestest.MockApplier.ReplaceManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:522
controller.go:97: missing call(s) to *kubernetestest.MockApplier.ApplyManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:316
controller.go:97: missing call(s) to *kubernetestest.MockApplier.ReplaceManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:392
controller.go:97: missing call(s) to *kubernetestest.MockApplier.ForceReplaceManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:419
controller.go:97: missing call(s) to *kubernetestest.MockApplier.ReplaceManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:470
controller.go:97: missing call(s) to *kubernetestest.MockApplier.ForceReplaceManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:496
controller.go:97: missing call(s) to *kubernetestest.MockApplier.CreateManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:523
controller.go:97: missing call(s) to *kubernetestest.MockApplier.ForceReplaceManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:549
controller.go:97: missing call(s) to *kubernetestest.MockApplier.CreateManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:550
controller.go:97: missing call(s) to *kubernetestest.MockApplier.ReplaceManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:340
controller.go:97: missing call(s) to *kubernetestest.MockApplier.ForceReplaceManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:366
controller.go:97: missing call(s) to *kubernetestest.MockApplier.CreateManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:393
controller.go:97: missing call(s) to *kubernetestest.MockApplier.CreateManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/kubernetes_test.go:420
controller.go:97: aborting test due to missing call(s)
--- FAIL: TestEnsureCanaryRollout (0.00s)
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:150
controller.go:251: missing call(s) to *cachetest.MockCache.Put(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:151
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:205
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:215
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:96
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:119
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:160
controller.go:251: missing call(s) to *kubernetestest.MockApplier.ApplyManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:181
controller.go:251: missing call(s) to *cachetest.MockCache.Put(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:206
controller.go:251: missing call(s) to *kubernetestest.MockApplier.ApplyManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:236
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:89
controller.go:251: missing call(s) to *cachetest.MockCache.Put(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:120
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/canary_test.go:127
controller.go:251: aborting test due to missing call(s)
--- FAIL: TestEnsureSync (0.00s)
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:97
controller.go:251: missing call(s) to *cachetest.MockCache.Put(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:98
controller.go:251: missing call(s) to *kubernetestest.MockApplier.ApplyManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:118
controller.go:251: missing call(s) to *kubernetestest.MockApplier.ApplyManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:164
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:71
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:78
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:105
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:143
controller.go:251: missing call(s) to *cachetest.MockCache.Put(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:144
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/sync_test.go:151
controller.go:251: aborting test due to missing call(s)
--- FAIL: TestEnsurePrimaryRollout (0.00s)
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:96
controller.go:251: missing call(s) to *cachetest.MockCache.Put(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:123
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:130
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:239
controller.go:251: missing call(s) to *cachetest.MockCache.Put(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:277
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:284
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:89
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:122
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:170
controller.go:251: missing call(s) to *cachetest.MockCache.Put(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:171
controller.go:251: missing call(s) to *kubernetestest.MockLoader.LoadManifests(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:178
controller.go:251: missing call(s) to *cachetest.MockCache.Put(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:232
controller.go:251: missing call(s) to *kubernetestest.MockApplier.ApplyManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:143
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:231
controller.go:251: missing call(s) to *kubernetestest.MockApplier.ApplyManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:198
controller.go:251: missing call(s) to *kubernetestest.MockApplier.ApplyManifest(is anything, is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:199
controller.go:251: missing call(s) to *cachetest.MockCache.Get(is anything) /home/sangnik/Videos/pipecd/pkg/app/piped/executor/kubernetes/primary_test.go:276
controller.go:251: aborting test due to missing call(s)
FAIL
FAIL github.com/pipe-cd/pipecd/pkg/app/piped/executor/kubernetes 4.523s
ok github.com/pipe-cd/pipecd/pkg/app/piped/executor/lambda 1.058s
What you expected to happen:
How to reproduce it:
make test/go
Environment:
- Go version: 1.24.3
- OS: Manjaro Linux 25.0.2
- Others:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.