2022-06-30 19:01:07 +03:00
|
|
|
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
|
|
|
|
|
|
|
|
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'
|
2022-08-05 14:24:50 +03:00
|
|
|
VERBOSE_LOG: false
|
2022-06-30 19:01:07 +03:00
|
|
|
continueOnError: false
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
cat block_blob_config.yaml
|
|
|
|
displayName: 'Print Block Blob Config File'
|
|
|
|
|
|
|
|
- script: |
|
2022-08-05 14:24:50 +03:00
|
|
|
blobfuse2 unmount all
|
|
|
|
sudo fusermount -u ${{ parameters.mount_dir }}
|
2022-06-30 19:01:07 +03:00
|
|
|
blobfuse2 mount ${{ parameters.mount_dir }} --config-file=${{ parameters.root_dir }}/block_blob_config.yaml
|
|
|
|
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'
|
2022-08-05 14:24:50 +03:00
|
|
|
arguments: '-v -timeout=2h -run Test.i.* -args -mnt-path=${{ parameters.mount_dir }} -adls=false -clone=true -tmp-path=${{ parameters.temp_dir }} -quick-test=false'
|
2022-06-30 19:01:07 +03:00
|
|
|
workingDirectory: ${{ parameters.work_dir }}/test/e2e_tests
|
|
|
|
displayName: 'E2E Test: Block Blob'
|
|
|
|
timeoutInMinutes: 120
|
|
|
|
continueOnError: false
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
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'
|
2022-08-05 14:24:50 +03:00
|
|
|
VERBOSE_LOG: false
|
2022-06-30 19:01:07 +03:00
|
|
|
continueOnError: false
|
|
|
|
|
|
|
|
- script: |
|
2022-08-05 14:24:50 +03:00
|
|
|
cat ${{ parameters.root_dir }}/adls_config.yaml
|
2022-06-30 19:01:07 +03:00
|
|
|
displayName: 'Print ADLS Config File'
|
|
|
|
|
|
|
|
- script: |
|
2022-08-05 14:24:50 +03:00
|
|
|
blobfuse2 unmount all
|
|
|
|
sudo fusermount -u ${{ parameters.mount_dir }}
|
2022-06-30 19:01:07 +03:00
|
|
|
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'
|
2022-08-05 14:24:50 +03:00
|
|
|
arguments: '-v -timeout=2h -run Test.i.* -args -mnt-path=${{ parameters.mount_dir }} -adls=true -clone=true -tmp-path=${{ parameters.temp_dir }} -quick-test=false'
|
2022-06-30 19:01:07 +03:00
|
|
|
workingDirectory: ${{ parameters.work_dir }}/test/e2e_tests
|
|
|
|
displayName: 'E2E Test: ADLS'
|
|
|
|
timeoutInMinutes: 120
|
|
|
|
continueOnError: false
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
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()
|