azure-storage-fuse/azure-pipeline-templates/huge-list-test.yml

87 строки
2.0 KiB
YAML
Executable File

parameters:
- name: working_dir
type: string
- name: mount_dir
type: string
- name: temp_dir
type: string
- name: idstring
type: string
default: ''
- name: mountStep
type: step
- name: distro_name
type: string
steps:
- script: |
sudo fusermount -u ${mount_dir}
sudo fusermount3 -u ${mount_dir}
sudo kill -9 `pidof blobfuse2` || true
timeoutInMinutes: 20
env:
mount_dir: ${{ parameters.mount_dir }}
displayName: 'HugeList: ${{ parameters.idstring }} PreStart Cleanup'
condition: always()
# Mount the container
- ${{ parameters.mountStep }}
# Wait for some time to let the container come up
- script: |
sleep 10s
displayName: 'HugeList: ${{ parameters.idstring }} Waiting for Mount'
env:
mount_dir: ${{ parameters.mount_dir }}
# Check blobfuse2 is mounted or not
- script: |
ps -aux | grep blobfuse2
df
echo "-------------------------------------------------------------------"
df | grep blobfuse2
exit $?
displayName: 'HugeList: ${{ parameters.idstring }} Verify Mount'
env:
mount_dir: ${{ parameters.mount_dir }}
# ----------------------------------------
# Huge Directory Listing Testing
# Directory Listing Tests
- script: ls -1 ${mount_dir}/huge | wc -l
timeoutInMinutes: 120
displayName: 'HugeList: ${{ parameters.idstring }} Listing'
continueOnError: false
env:
mount_dir: ${{ parameters.mount_dir }}
- script: |
cat blobfuse2-logs.txt
displayName: 'View Logs'
condition: always()
- script: |
> blobfuse2-logs.txt
displayName: 'Clear Logs'
condition: always()
# Never cleanup here on container otherwise we lose the huge data, just unmount and go
- script: |
sudo fusermount -u ${mount_dir}
sudo fusermount3 -u ${mount_dir}
sudo kill -9 `pidof blobfuse2` || true
timeoutInMinutes: 5
env:
mount_dir: ${{ parameters.mount_dir }}
displayName: 'HugeList: ${{ parameters.idstring }} Unmount'
condition: always()