azure-storage-fuse/azure-pipeline-templates/release-distro-tests.yml

147 строки
4.5 KiB
YAML

parameters:
- name: root_dir
type: string
- name: work_dir
type: string
- name: mount_dir
type: string
- name: temp_dir
type: string
- name: container
type: string
- name: extras
type: string
default: ""
steps:
- script: |
blobfuse2 version
displayName: 'Check Version'
- script: |
blobfuse2 --help
displayName: 'Check Help'
- script: |
sudo rm -rf ${{ parameters.mount_dir }}
sudo rm -rf ${{ parameters.temp_dir }}
mkdir -p ${{ parameters.mount_dir }}
mkdir -p ${{ parameters.temp_dir }}
displayName: 'Prepare Blobfuse Directories'
- script: |
blobfuse2 gen-test-config --config-file=${{ parameters.root_dir }}/azure-storage-fuse/testdata/config/azure_key.yaml --container-name=${{ parameters.container }} --temp-path=${{ parameters.temp_dir }} --output-file=${{ parameters.root_dir }}/block_blob_config.yaml
displayName: 'Create Blob Config File'
env:
NIGHTLY_STO_ACC_NAME: $(NIGHTLY_STO_BLOB_ACC_NAME)
NIGHTLY_STO_ACC_KEY: $(NIGHTLY_STO_BLOB_ACC_KEY)
ACCOUNT_TYPE: 'block'
ACCOUNT_ENDPOINT: 'https://$(NIGHTLY_STO_BLOB_ACC_NAME).blob.core.windows.net'
VERBOSE_LOG: false
USE_HTTP: false
continueOnError: false
- script: |
cat block_blob_config.yaml
displayName: 'Print Block Blob Config File'
- script: |
blobfuse2 unmount all
sudo kill -9 `pidof blobfuse2`
sudo fusermount -u ${{ parameters.mount_dir }}
blobfuse2 mount ${{ parameters.mount_dir }} --config-file=${{ parameters.root_dir }}/block_blob_config.yaml ${{ parameters.extras}}
displayName: 'Mount Block Blob'
# Wait for some time to let the container come up
- script: |
sleep 10s
displayName: 'Waiting for Mount'
- script: |
df
echo "-------------------------------------------------------------------"
df | grep blobfuse2
exit $?
displayName: 'Verify Mount'
- task: Go@0
inputs:
command: 'test'
arguments: '-v -timeout=2h -run Test.i.* -args -mnt-path=${{ parameters.mount_dir }} -adls=false -clone=false -tmp-path=${{ parameters.temp_dir }} -quick-test=true'
workingDirectory: ${{ parameters.work_dir }}/test/e2e_tests
displayName: 'E2E Test: Block Blob'
timeoutInMinutes: 120
continueOnError: false
- script: |
sleep 10s
blobfuse2 unmount ${{ parameters.mount_dir }}
displayName: 'Unmount Blob'
- script: |
cat blobfuse2-logs.txt
displayName: 'View Logs'
condition: always()
- script: |
> blobfuse2-logs.txt
displayName: 'Clear Logs'
condition: always()
- script: |
blobfuse2 gen-test-config --config-file=${{ parameters.root_dir }}/azure-storage-fuse/testdata/config/azure_key.yaml --container-name=${{ parameters.container }} --temp-path=${{ parameters.temp_dir }} --output-file=${{ parameters.root_dir }}/adls_config.yaml
displayName: 'Create ADLS Config File'
env:
NIGHTLY_STO_ACC_NAME: $(AZTEST_ADLS_ACC_NAME)
NIGHTLY_STO_ACC_KEY: $(AZTEST_ADLS_KEY)
ACCOUNT_TYPE: 'adls'
ACCOUNT_ENDPOINT: 'https://$(AZTEST_ADLS_ACC_NAME).dfs.core.windows.net'
VERBOSE_LOG: false
USE_HTTP: false
continueOnError: false
- script: |
cat ${{ parameters.root_dir }}/adls_config.yaml
displayName: 'Print ADLS Config File'
- script: |
blobfuse2 unmount all
sudo fusermount -u ${{ parameters.mount_dir }}
blobfuse2 mount ${{ parameters.mount_dir }} --config-file=${{ parameters.root_dir }}/adls_config.yaml
displayName: 'Mount ADLS'
# Wait for some time to let the container come up
- script: |
sleep 10s
displayName: 'Waiting for Mount'
- script: |
df
echo "-------------------------------------------------------------------"
df | grep blobfuse2
exit $?
displayName: 'Verify Mount'
- task: Go@0
inputs:
command: 'test'
arguments: '-v -timeout=2h -run Test.i.* -args -mnt-path=${{ parameters.mount_dir }} -adls=true -clone=false -tmp-path=${{ parameters.temp_dir }} -quick-test=true'
workingDirectory: ${{ parameters.work_dir }}/test/e2e_tests
displayName: 'E2E Test: ADLS'
timeoutInMinutes: 120
continueOnError: false
- script: |
sleep 10s
blobfuse2 unmount ${{ parameters.mount_dir }}
displayName: 'Unmount ADLS'
- script: |
cat blobfuse2-logs.txt
displayName: 'View Logs'
condition: always()
- script: |
> blobfuse2-logs.txt
displayName: 'Clear Logs'
condition: always()