Skip to content

Commit

Permalink
resolving comments
Browse files Browse the repository at this point in the history
  • Loading branch information
manika137 committed Dec 27, 2024
1 parent bfe34e1 commit 00f5e74
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 50 deletions.
1 change: 1 addition & 0 deletions hadoop-tools/hadoop-azure/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ src/test/resources/abfs-combination-test-configs.xml
dev-support/testlogs
src/test/resources/accountSettings/*
!src/test/resources/accountSettings/accountName_settings.xml.template
dev-support/testrun-scripts/cronjob.sh
30 changes: 0 additions & 30 deletions hadoop-tools/hadoop-azure/dev-support/testrun-scripts/cronjob.sh

This file was deleted.

20 changes: 10 additions & 10 deletions hadoop-tools/hadoop-azure/dev-support/testrun-scripts/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ cleanUpTestContainers=false
if [ "$IS_CRON_JOB" = "true" ]; then
runTest=true
runHNSOAuthDFSTest
runHNSSharedKeyDFSTest
runNonHNSSharedKeyDFSTest
runAppendBlobHNSOAuthDFSTest
runNonHNSSharedKeyBlobTest
runNonHNSOAuthDFSTest
runNonHNSOAuthBlobTest
runAppendBlobNonHNSOAuthBlobTest
runHNSOAuthDFSIngressBlobTest
runNonHNSOAuthDFSIngressBlobTest
# runHNSSharedKeyDFSTest
# runNonHNSSharedKeyDFSTest
# runAppendBlobHNSOAuthDFSTest
# runNonHNSSharedKeyBlobTest
# runNonHNSOAuthDFSTest
# runNonHNSOAuthBlobTest
# runAppendBlobNonHNSOAuthBlobTest
# runHNSOAuthDFSIngressBlobTest
# runNonHNSOAuthDFSIngressBlobTest
uploadToAzure
else

Expand Down Expand Up @@ -267,7 +267,7 @@ do
done
fi

if [[ $runTest == true && $"$IS_CRON_JOB" != "true" ]]
if [[ $runTest && $"$IS_CRON_JOB" != "true" ]]
then
printAggregate
fi
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ ENDTIME=$(date +%s)
outputFormatOn="\033[0;95m"
outputFormatOff="\033[0m"

targetWord="dfs"
replacementWord="blob"
targetWord=".dfs."
replacementWord=".blob."
accountSettingsDir="src/test/resources/accountSettings/"
accountConfigFileSuffix="_settings.xml"

Expand All @@ -64,15 +64,16 @@ fnsBlobConfigFileCheck() {
fi
}

if ! command -v az &> /dev/null
then
echo "Azure CLI (az) could not be found. Installing Azure CLI..."
if ! sudo apt update || ! sudo apt install -y azure-cli; then
echo "Failed to install Azure CLI. Exiting..."
exit 1
checkCronjobDependencies() {
if ! [ "$(command -v az)" ]; then
echo "Azure CLI (az) could not be found. Installing Azure CLI..."
if ! sudo apt update || ! sudo apt install -y azure-cli; then
echo "Failed to install Azure CLI. Exiting..."
exit 1
fi
echo "Azure CLI installed successfully."
fi
echo "Azure CLI installed successfully."
fi
}

uploadToAzure() {
azureConfigFilePath="${accountSettingsDir}runresult${accountConfigFileSuffix}"
Expand All @@ -89,6 +90,7 @@ uploadToAzure() {
directoryStructure="$year-$month-$day/$branchName"
AggregatedTestFolder="$testOutputLogFolder"

checkCronjobDependencies
az storage container create --name $containerName --account-name $testResultsAccountName --account-key "$testResultsAccountKey"
az storage blob upload-batch --destination "$containerName/$directoryStructure" --source $AggregatedTestFolder --account-name $testResultsAccountName --account-key "$testResultsAccountKey"

Expand Down

0 comments on commit 00f5e74

Please sign in to comment.