Skip to content

Commit

Permalink
enable single module test (#144)
Browse files Browse the repository at this point in the history
*  enable single module test
  • Loading branch information
Fred-sun authored Jun 24, 2020
1 parent dcda109 commit 9791422
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 1 deletion.
60 changes: 60 additions & 0 deletions pr-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,66 @@ parameters:
values:
- "2.9.0"
- "2.9.9"
- name: MODULE_NAME
displayName: 'Test Module'
type: string
default: 'all'
values:
- 'all'
- "azure_rm_acs"
- "azure_rm_aks"
- "azure_rm_appgateway"
- "azure_rm_appserviceplan"
- "azure_rm_automationaccount"
- "azure_rm_autoscale"
- "azure_rm_availabilityset"
- "azure_rm_azurefirewall"
- "azure_rm_batchaccount"
- "azure_rm_cdnprofile"
- "azure_rm_containerinstance"
- "azure_rm_containerregistry"
- "azure_rm_cosmosdbaccount"
- "azure_rm_deployment"
- "azure_rm_dnsrecordset"
- "azure_rm_dnszone"
- "azure_rm_functionapp"
- "azure_rm_gallery"
- "azure_rm_hdinsightcluster"
- "azure_rm_image"
- "azure_rm_iothub"
- "azure_rm_keyvault"
- "azure_rm_keyvaultkey"
- "azure_rm_keyvaultsecret"
- "azure_rm_loadbalancer"
- "azure_rm_manageddisk"
- "azure_rm_mariadbserver"
- "azure_rm_monitorlogprofile"
- "azure_rm_mysqlserver"
- "azure_rm_networkinterface"
- "azure_rm_postgresqlserver"
- "azure_rm_publicipaddress"
- "azure_rm_rediscache"
- "azure_rm_resource"
- "azure_rm_resourcegroup"
- "azure_rm_routetable"
- "azure_rm_securitygroup"
- "azure_rm_servicebus"
- "azure_rm_sqlserver"
- "azure_rm_storageaccount"
- "azure_rm_storageblob"
- "azure_rm_subnet"
- "azure_rm_trafficmanagerprofile"
- "azure_rm_virtualmachine"
- "azure_rm_virtualmachineextension"
- "azure_rm_virtualmachineimage_info"
- "azure_rm_virtualmachinescaleset"
- "azure_rm_virtualnetwork"
- "azure_rm_virtualnetworkgateway"
- "azure_rm_virtualnetworkeepring"
- "azure_rm_webapp"
- "azure_rm_workspace"
- "inventory_azure"
- "setup_azure"

trigger: none

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/azure_rm_aks/aliases
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cloud/azure
unsupported
destructive
destructive
16 changes: 16 additions & 0 deletions tests/utils/ado/ado.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,22 @@ fi

timeout=60

test_list=("azure_rm_acs" "azure_rm_aks" "azure_rm_appgateway" "azure_rm_appserviceplan" "azure_rm_automationaccount" "azure_rm_autoscale" "azure_rm_availabilityset" "azure_rm_azurefirewall" "azure_rm_batchaccount" "azure_rm_cdnprofile" "azure_rm_containerinstance" "azure_rm_containerregistry" "azure_rm_cosmosdbaccount" "azure_rm_deployment" "azure_rm_dnsrecordset" "azure_rm_dnszone" "azure_rm_functionapp" "azure_rm_gallery" "azure_rm_hdinsightcluster" "azure_rm_image" "azure_rm_iothub" "azure_rm_keyvault" "azure_rm_keyvaultkey" "azure_rm_keyvaultsecret" "azure_rm_loadbalancer" "azure_rm_manageddisk" "azure_rm_mariadbserver" "azure_rm_monitorlogprofile" "azure_rm_mysqlserver" "azure_rm_networkinterface" "azure_rm_postgresqlserver" "azure_rm_publicipaddress" "azure_rm_rediscache" "azure_rm_resource" "azure_rm_resourcegroup" "azure_rm_routetable" "azure_rm_securitygroup" "azure_rm_servicebus" "azure_rm_sqlserver" "azure_rm_storageaccount" "azure_rm_storageblob" "azure_rm_subnet" "azure_rm_trafficmanagerprofile" "azure_rm_virtualmachine" "azure_rm_virtualmachineextension" "azure_rm_virtualmachineimage_info" "azure_rm_virtualmachinescaleset" "azure_rm_virtualnetwork" "azure_rm_virtualnetworkgateway" "azure_rm_virtualnetworkpeering" "azure_rm_webapp" "azure_rm_workspace" "inventory_azure" "setup_azure" "azure_rm_acs" "azure_rm_aks" "azure_rm_appgateway" "azure_rm_appserviceplan" "azure_rm_automationaccount" "azure_rm_autoscale" "azure_rm_availabilityset" "azure_rm_azurefirewall" "azure_rm_batchaccount" "azure_rm_cdnprofile" "azure_rm_containerinstance" "azure_rm_containerregistry" "azure_rm_cosmosdbaccount" "azure_rm_deployment" "azure_rm_dnsrecordset" "azure_rm_dnszone" "azure_rm_functionapp" "azure_rm_gallery" "azure_rm_hdinsightcluster" "azure_rm_image" "azure_rm_iothub" "azure_rm_keyvault" "azure_rm_keyvaultkey" "azure_rm_keyvaultsecret" "azure_rm_loadbalancer" "azure_rm_manageddisk" "azure_rm_mariadbserver" "azure_rm_monitorlogprofile" "azure_rm_mysqlserver" "azure_rm_networkinterface" "azure_rm_postgresqlserver" "azure_rm_publicipaddress" "azure_rm_rediscache" "azure_rm_resource" "azure_rm_resourcegroup" "azure_rm_routetable" "azure_rm_securitygroup" "azure_rm_servicebus" "azure_rm_sqlserver" "azure_rm_storageaccount" "azure_rm_storageblob" "azure_rm_subnet" "azure_rm_trafficmanagerprofile" "azure_rm_virtualmachine" "azure_rm_virtualmachineextension" "azure_rm_virtualmachineimage_info" "azure_rm_virtualmachinescaleset" "azure_rm_virtualnetwork" "azure_rm_virtualnetworkgateway" "azure_rm_virtualnetworkpeering" "azure_rm_webapp" "azure_rm_workspace" "inventory_azure" "setup_azure")
if [ "$2" = "all" ]
then
echo "All module need test"
else
for item in ${test_list[*]}
do
if [ "${item}" = "$2" ]
then
echo "PASS"
else
echo "disabled" >> "${TEST_DIR}"/tests/integration/targets/"${item}"/aliases
fi
done
fi

ansible-test env --dump --show --timeout "${timeout}" --color -v

cat <<EOF >> "${TEST_DIR}"/tests/integration/cloud-config-azure.ini
Expand Down

0 comments on commit 9791422

Please sign in to comment.