@@ -19,6 +19,7 @@ package fluidapp
1919import (
2020 "context"
2121
22+ "github.com/agiledragon/gomonkey/v2"
2223 . "github.com/onsi/ginkgo/v2"
2324 . "github.com/onsi/gomega"
2425 corev1 "k8s.io/api/core/v1"
@@ -31,6 +32,7 @@ import (
3132
3233 "github.com/fluid-cloudnative/fluid/pkg/common"
3334 "github.com/fluid-cloudnative/fluid/pkg/utils/fake"
35+ "github.com/fluid-cloudnative/fluid/pkg/utils/kubeclient"
3436)
3537
3638func newFluidAppScheme () * runtime.Scheme {
@@ -122,6 +124,11 @@ var _ = Describe("FluidAppReconciler", func() {
122124 Describe ("internalReconcile" , func () {
123125 Context ("when pod has fuse containers" , func () {
124126 It ("should handle pod reconciliation with fuse sidecars" , func () {
127+ patches := gomonkey .ApplyFunc (kubeclient .ExecCommandInContainer , func (string , string , string , []string ) (string , string , error ) {
128+ return "" , "" , nil
129+ })
130+ defer patches .Reset ()
131+
125132 s := newFluidAppScheme ()
126133 pod := & corev1.Pod {
127134 ObjectMeta : metav1.ObjectMeta {
@@ -137,7 +144,7 @@ var _ = Describe("FluidAppReconciler", func() {
137144 {
138145 Name : common .FuseContainerName + "-0" ,
139146 VolumeMounts : []corev1.VolumeMount {{
140- Name : "fuse-mount" ,
147+ Name : "juicefs- fuse-mount" ,
141148 MountPath : "/mnt/fuse" ,
142149 }},
143150 },
0 commit comments