Skip to content

Commit a0a0293

Browse files
committed
added bash script for running tests
1 parent 2615906 commit a0a0293

File tree

6 files changed

+83
-17
lines changed

6 files changed

+83
-17
lines changed

AppendBlobReader/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,17 @@ This command copies required files in `AppendBlobReader/target` directory
3535

3636
Integrations tests are in `AppendBlobReader/tests` folder and unit tests are in sumo-`function-utils/tests` folder
3737

38+
Modify the run_integration_test.sh file with below parameters
3839
```console
3940

40-
export AZURE_SUBSCRIPTION_ID=`<Your azure subscription id, to obtain it refer docs https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-azure-subscription>`
41-
export AZURE_CLIENT_ID=`Your application id which you can get after registering application. Refer https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application`
42-
export AZURE_CLIENT_SECRET=`Generate client secret by referring docs https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#add-credentials`
43-
export AZURE_TENANT_ID=`You tenant id, to obtain it refer docs https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-microsoft-entra-tenant`
44-
export AZURE_DEFAULT_REGION=`eastus`
45-
export SUMO_ACCESS_ID=`<Generate access id and access key https://help.sumologic.com/docs/manage/security/access-keys/#create-your-access-key>`
46-
export SUMO_ACCESS_KEY=`<Generate access id and access key https://help.sumologic.com/docs/manage/security/access-keys/#create-your-access-key>`
47-
export SUMO_DEPLOYMENT=`Enter one of the allowed values au, ca, de, eu, fed, in, jp, us1 or us2. Visit https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security`
41+
AZURE_SUBSCRIPTION_ID=`<Your azure subscription id, to obtain it refer docs https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-azure-subscription>`
42+
AZURE_CLIENT_ID=`Your application id which you can get after registering application. Refer https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application`
43+
AZURE_CLIENT_SECRET=`Generate client secret by referring docs https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#add-credentials`
44+
AZURE_TENANT_ID=`You tenant id, to obtain it refer docs https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-microsoft-entra-tenant`
45+
AZURE_DEFAULT_REGION=`eastus`
46+
SUMO_ACCESS_ID=`<Generate access id and access key https://help.sumologic.com/docs/manage/security/access-keys/#create-your-access-key>`
47+
SUMO_ACCESS_KEY=`<Generate access id and access key https://help.sumologic.com/docs/manage/security/access-keys/#create-your-access-key>`
48+
SUMO_DEPLOYMENT=`Enter one of the allowed values au, ca, de, eu, fed, in, jp, us1 or us2. Visit https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security`
4849
```
4950

5051
Execute below command under `AppendBlobReader/tests` directory
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
export AZURE_SUBSCRIPTION_ID=""
4+
# application id
5+
export AZURE_CLIENT_ID=""
6+
export AZURE_CLIENT_SECRET=""
7+
export AZURE_TENANT_ID=""
8+
export AZURE_DEFAULT_REGION="eastus"
9+
export SUMO_ACCESS_ID=""
10+
export SUMO_ACCESS_KEY=""
11+
export SUMO_DEPLOYMENT="us1"
12+
export TEMPLATE_NAME="appendblobreaderdeploy.json"
13+
python test_appendblobreader.py
14+
# For deleting leftover resources in case of failures
15+
# python ~/git/sumologic-azure-function/deletetestresourcegroups.py

BlockBlobReader/README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,21 @@ Integrations tests are in `BlockBlobReader/tests` folder and unit tests are in `
3737

3838
Integrations tests are in `BlockBlobReader/tests` folder and unit tests are in sumo-`function-utils/tests` folder
3939

40-
```console
40+
Modify the run_integration_test.sh file with below parameters
4141

42-
export AZURE_SUBSCRIPTION_ID=`<Your azure subscription id, to obtain it refer docs https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-azure-subscription>`
43-
export AZURE_CLIENT_ID=`Your application id which you can get after registering application. Refer https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application`
44-
export AZURE_CLIENT_SECRET=`Generate client secret by referring docs https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#add-credentials`
45-
export AZURE_TENANT_ID=`You tenant id, to obtain it refer docs https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-microsoft-entra-tenant`
46-
export AZURE_DEFAULT_REGION=`eastus`
47-
export SUMO_ACCESS_ID=`<Generate access id and access key https://help.sumologic.com/docs/manage/security/access-keys/#create-your-access-key>`
48-
export SUMO_ACCESS_KEY=`<Generate access id and access key https://help.sumologic.com/docs/manage/security/access-keys/#create-your-access-key>`
49-
export SUMO_DEPLOYMENT=`Enter one of the allowed values au, ca, de, eu, fed, in, jp, us1 or us2. Visit https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security`
42+
```console
5043

44+
AZURE_SUBSCRIPTION_ID=`<Your azure subscription id, to obtain it refer docs https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-azure-subscription>`
45+
AZURE_CLIENT_ID=`Your application id which you can get after registering application. Refer https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application`
46+
AZURE_CLIENT_SECRET=`Generate client secret by referring docs https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#add-credentials`
47+
AZURE_TENANT_ID=`You tenant id, to obtain it refer docs https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-microsoft-entra-tenant`
48+
AZURE_DEFAULT_REGION=`eastus`
49+
SUMO_ACCESS_ID=`<Generate access id and access key https://help.sumologic.com/docs/manage/security/access-keys/#create-your-access-key>`
50+
SUMO_ACCESS_KEY=`<Generate access id and access key https://help.sumologic.com/docs/manage/security/access-keys/#create-your-access-key>`
51+
SUMO_DEPLOYMENT=`Enter one of the allowed values au, ca, de, eu, fed, in, jp, us1 or us2. Visit https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security`
5152
```
5253

54+
5355
Execute below command under `BlockBlobReader/tests` directory
5456

5557
`python test_blobreader.py`
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
export AZURE_SUBSCRIPTION_ID=""
4+
# application id
5+
export AZURE_CLIENT_ID=""
6+
export AZURE_CLIENT_SECRET=""
7+
export AZURE_TENANT_ID=""
8+
export AZURE_DEFAULT_REGION="eastus"
9+
export SUMO_ACCESS_ID=""
10+
export SUMO_ACCESS_KEY=""
11+
export SUMO_DEPLOYMENT="us1"
12+
export TEMPLATE_NAME="blobreaderdeploy.json"
13+
# export FIXTURE_FILE="blob_fixtures.json"
14+
export FIXTURE_FILE="blob_fixtures_vnetflowlogs.json"
15+
# export FIXTURE_FILE="blob_fixtures_subnetflowlogs.json"
16+
# export FIXTURE_FILE="blob_fixtures_networkinterfaceflowlogs.json"
17+
export MAX_FOLDER_DEPTH=1
18+
# export TEMPLATE_NAME="blobreaderdeploywithPremiumPlan.json"
19+
# export TEMPLATE_NAME="blobreaderzipdeploy.json"
20+
python test_blobreader.py
21+
# python ~/git/sumologic-azure-function/deletetestresourcegroups.py

EventHubs/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,15 @@ This command copies required files in two directories logs_build(used for activi
2424

2525
Integrations tests are in EventHubs/tests folder and unit tests are in sumo-function-utils/tests folder
2626

27+
Modify the run_integration_test.sh file with below parameters
28+
```console
29+
30+
AZURE_SUBSCRIPTION_ID=`<Your azure subscription id, to obtain it refer docs https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-azure-subscription>`
31+
AZURE_CLIENT_ID=`Your application id which you can get after registering application. Refer https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application`
32+
AZURE_CLIENT_SECRET=`Generate client secret by referring docs https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#add-credentials`
33+
AZURE_TENANT_ID=`You tenant id, to obtain it refer docs https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-microsoft-entra-tenant`
34+
AZURE_DEFAULT_REGION=`eastus`
35+
SUMO_ACCESS_ID=`<Generate access id and access key https://help.sumologic.com/docs/manage/security/access-keys/#create-your-access-key>`
36+
SUMO_ACCESS_KEY=`<Generate access id and access key https://help.sumologic.com/docs/manage/security/access-keys/#create-your-access-key>`
37+
SUMO_DEPLOYMENT=`Enter one of the allowed values au, ca, de, eu, fed, in, jp, us1 or us2. Visit https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security`
38+
```
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
export AZURE_SUBSCRIPTION_ID=""
4+
# application id
5+
export AZURE_CLIENT_ID=""
6+
export AZURE_CLIENT_SECRET=""
7+
export AZURE_TENANT_ID=""
8+
export AZURE_DEFAULT_REGION="eastus"
9+
export SUMO_ACCESS_ID=""
10+
export SUMO_ACCESS_KEY=""
11+
export SUMO_DEPLOYMENT="us1"
12+
export TEMPLATE_NAME="azuredeploy_metrics.json"
13+
python test_eventhub_metrics.py
14+
# For deleting leftover resources in case of failures
15+
# python ~/git/sumologic-azure-function/deletetestresourcegroups.py

0 commit comments

Comments
 (0)