@@ -29,6 +29,7 @@ import (
2929 corev1 "k8s.io/api/core/v1"
3030
3131 "github.com/juicedata/juicefs-operator/pkg/common"
32+ pkgutils "github.com/juicedata/juicefs-operator/pkg/utils"
3233 "github.com/juicedata/juicefs-operator/test/utils"
3334)
3435
@@ -771,7 +772,7 @@ var _ = Describe("controller", Ordered, func() {
771772 fmt .Println ("pods:" )
772773 fmt .Println (string (result ))
773774
774- cmd = exec .Command ("kubectl" , "get" , "po" , "-l" , fmt .Sprintf ("job-name=%s" , common .GenJobName (wuName )), "-n" , namespace , "--no-headers" , "-o" , "jsonpath='{.items[*].metadata.name}'" )
775+ cmd = exec .Command ("kubectl" , "get" , "po" , "-l" , fmt .Sprintf ("job-name=%s" , pkgutils .GenJobName (wuName )), "-n" , namespace , "--no-headers" , "-o" , "jsonpath='{.items[*].metadata.name}'" )
775776 result , _ = utils .Run (cmd )
776777 if len (utils .GetNonEmptyLines (string (result ))) == 1 && strings .TrimSpace (string (result )) != "''" {
777778 fmt .Println ("warmup pod describe:" )
@@ -817,7 +818,7 @@ var _ = Describe("controller", Ordered, func() {
817818
818819 By ("validating warmup job running" )
819820 verifyWarmUpJobRunning := func () error {
820- cmd := exec .Command ("kubectl" , "get" , "job" , common .GenJobName (wuName ), "-n" , namespace , "-o" , "jsonpath={.status.active}" )
821+ cmd := exec .Command ("kubectl" , "get" , "job" , pkgutils .GenJobName (wuName ), "-n" , namespace , "-o" , "jsonpath={.status.active}" )
821822 result , err := utils .Run (cmd )
822823 if err != nil {
823824 return fmt .Errorf ("get warmup job failed, %+v" , err )
@@ -839,7 +840,7 @@ var _ = Describe("controller", Ordered, func() {
839840 if string (status ) != "Running" {
840841 return fmt .Errorf ("warmup in %s status" , status )
841842 }
842- cmd = exec .Command ("kubectl" , "get" , "po" , "-l" , fmt .Sprintf ("job-name=%s" , common .GenJobName (wuName )), "-n" , namespace , "--no-headers" )
843+ cmd = exec .Command ("kubectl" , "get" , "po" , "-l" , fmt .Sprintf ("job-name=%s" , pkgutils .GenJobName (wuName )), "-n" , namespace , "--no-headers" )
843844 result , err := utils .Run (cmd )
844845 if err != nil {
845846 return fmt .Errorf ("get warmup job pod failed, %+v" , err )
0 commit comments