Kubernetes Executor Unit Tests Fail
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:
@sagnik3788 could you assign it to pls
@sagnik3788
- Would you please share your k8s version etc.?
- Does that always happen? Or just sometimes?
It does not occur in our CI.
@Denish3436 Thank you, I assigned you. Please share your investigation result, including the cause, here before submitting a PR.
@t-kikuc thanks for assigned me, I will share all details soon before submitting my PR...