Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
Signed-off-by: zwwhdls <zww@hdls.me>
  • Loading branch information
zwwhdls committed Mar 1, 2023
1 parent 7a883db commit 1f0e506
Showing 1 changed file with 72 additions and 28 deletions.
100 changes: 72 additions & 28 deletions pkg/ddc/juicefs/data_load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,43 +25,87 @@ import (
)

var valuesConfigMapData = `
fullnameOverride: test-dataset
cacheDirs:
"1":
path: /jfs/cache3:/jfs/cache4
type: hostPath
configs:
accesskeySecret: jfs-secret
accesskeySecretKey: accesskey
bucket: http://minio.default.svc.cluster.local:9000/minio/test2
formatCmd: /usr/local/bin/juicefs format --trash-days=0 --access-key=${ACCESS_KEY}
--secret-key=${SECRET_KEY} --storage=minio --bucket=http://minio.default.svc.cluster.local:9000/minio/test2
${METAURL} minio
metaurlSecret: jfs-secret
metaurlSecretKey: metaurl
name: minio
secretkeySecret: jfs-secret
secretkeySecretKey: secretkey
storage: minio
edition: community
image: juicedata/juicefs-csi-driver
imageTag: v0.11.0
imagePullPolicy: IfNotPresent
user: 0
group: 0
fsGroup: 0
fullnameOverride: jfsdemo
fuse:
metricsPort: 14001
prepare:
subPath: /dir1
name: pics
accesskeySecret: juicefs-secret
secretkeySecret: juicefs-secret
bucket: http://xx.xx.xx.xx/pics
metaurlSecret: juicefs-secret
storage: minio
image: juicedata/juicefs-csi-driver
nodeSelector:
fluid.io/f-fluid-test-dataset: "true"
imageTag: v0.11.0
mountPath: /runtime-mnt/juicefs/fluid/test-dataset/juicefs-fuse
cacheDir: /tmp/jfs-cache
hostMountPath: /runtime-mnt/juicefs/fluid/test-dataset
command: /bin/mount.juicefs redis://xx.xx.xx.xx:6379/1 /runtime-mnt/juicefs/fluid/test-dataset/juicefs-fuse -o metrics=0.0.0.0:9567,subdir=/dir1,cache-size=4096,free-space-ratio=0.1,cache-dir=/tmp/jfs-cache
statCmd: stat -c %i /runtime-mnt/juicefs/fluid/test-dataset/juicefs-fuse
enabled: true
command: /bin/mount.juicefs ${METAURL} /runtime-mnt/juicefs/default/jfsdemo/juicefs-fuse
-o metrics=0.0.0.0:9567,cache-size=1024,free-space-ratio=0.1,cache-dir=/jfs/cache3:/jfs/cache4
criticalPod: true
enabled: true
hostMountPath: /runtime-mnt/juicefs/default/jfsdemo
hostNetwork: true
image: registry.cn-hangzhou.aliyuncs.com/juicefs/juicefs-fuse
imagePullPolicy: IfNotPresent
imageTag: v1.0.0-4.8.0
mountPath: /runtime-mnt/juicefs/default/jfsdemo/juicefs-fuse
nodeSelector:
fluid.io/f-default-jfsdemo: "true"
privileged: true
resources: {}
statCmd: stat -c %i /runtime-mnt/juicefs/default/jfsdemo/juicefs-fuse
volumeMounts:
- mountPath: /jfs/cache3:/jfs/cache4
name: cache-dir-1
volumes:
- hostPath:
path: /jfs/cache3:/jfs/cache4
type: DirectoryOrCreate
name: cache-dir-1
group: 0
image: registry.cn-hangzhou.aliyuncs.com/juicefs/juicefs-fuse
imagePullPolicy: IfNotPresent
imagePullSecrets: null
imageTag: v1.0.0-4.8.0
owner:
apiVersion: data.fluid.io/v1alpha1
blockOwnerDeletion: false
controller: true
enabled: true
kind: JuiceFSRuntime
name: jfsdemo
uid: 9ae3312b-d5b6-4a3d-895c-7712bfa7d74e
placement: Exclusive
runtimeIdentity:
name: jfsdemo
namespace: default
source: ${METAURL}
user: 0
worker:
metricsPort: 14000
cacheDir: /tmp/jfs-cache
command: /bin/mount.juicefs ${METAURL} /runtime-mnt/juicefs/default/jfsdemo/juicefs-fuse
-o cache-size=1024,free-space-ratio=0.1,cache-dir=/jfs/cache1:/jfs/cache2,metrics=0.0.0.0:9567
hostNetwork: true
placement: Exclusive
Events: <none>
mountPath: /runtime-mnt/juicefs/default/jfsdemo/juicefs-fuse
privileged: true
resources: {}
statCmd: stat -c %i /runtime-mnt/juicefs/default/jfsdemo/juicefs-fuse
volumeMounts:
- mountPath: /jfs/cache1:/jfs/cache2
name: cache-dir-1
volumes:
- hostPath:
path: /jfs/cache1:/jfs/cache2
type: DirectoryOrCreate
name: cache-dir-1
`

func TestJuiceFSEngine_CreateDataLoadJob(t *testing.T) {
Expand Down

0 comments on commit 1f0e506

Please sign in to comment.