Skip to content

Commit

Permalink
Merge pull request #210 from HewlettPackard/add_dev_test
Browse files Browse the repository at this point in the history
Added Dev acceptance case
  • Loading branch information
manjunath-batakurki authored Nov 27, 2023
2 parents 28b3276 + c842a09 commit 2419eb4
Show file tree
Hide file tree
Showing 15 changed files with 99 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/acc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: acc
name: Acceptance Tests

on:
# Runs every 2 days once at 3AM
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/dev-acc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Dev Acceptance Tests

on:
# Runs every 2 days once at 3AM
# schedule:
# - cron: '0 21 */2 * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Test scenario tags'
# release:
# types: [published]
env:
HPEGL_IAM_SERVICE_URL: ${{ secrets.DEV_HPEGL_IAM_SERVICE_URL }}
HPEGL_TENANT_ID: ${{ secrets.DEV_HPEGL_TENANT_ID }}
HPEGL_USER_SECRET: ${{ secrets.DEV_HPEGL_USER_SECRET }}
HPEGL_USER_ID: ${{ secrets.DEV_HPEGL_USER_ID }}
HPEGL_VMAAS_API_URL: ${{ secrets.DEV_HPEGL_VMAAS_API_URL }}
HPEGL_VMAAS_LOCATION: ${{ secrets.DEV_HPEGL_VMAAS_LOCATION }}
HPEGL_VMAAS_SPACE_NAME: ${{ secrets.DEV_HPEGL_VMAAS_SPACE_NAME}}
TF_ACC: ${{ secrets.TF_ACC }}
jobs:
acc:
runs-on: ubuntu-20.04
strategy:
matrix:
go: [ '1.17' ]
name: Dev Acceptance Tests
steps:
- name: Checkout workspace
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Install dependencies
run: |
sudo apt-get install -y wget jq
wget https://releases.hashicorp.com/terraform/1.0.0/terraform_1.0.0_linux_amd64.zip
sudo unzip -fo terraform_1.0.0_linux_amd64.zip -d /usr/local/bin
- name: Install necessary tools
run: make tools

- name: Run Acceptance test
run: |
TF_ACC_TEST_PATH="$(pwd)/acc-dev-testcases" && make acceptance
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# vmaas-terraform-resources

- [vmaas-terraform-resources](#vmaas-terraform-resources)
* [Introduction](#Terraform resources for HPEGL VMaaS)
* [Introduction](#terraform-resources-for-hpegl-vmaas)
* [Requirements](#Requirements)
* [Usage](#Usage)
* [Building the resources as provider](#Building the resources as provider)
* [Building the resources as provider](#building-the-resources-as-provider)

# Terraform resources for HPEGL VMaaS

Expand Down
4 changes: 2 additions & 2 deletions acc-dev-testcases/data-sources/load_balancer.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
acc:
- config: |
name = "tl_lb_dnd"
name = "tf_lb_DND"
validations:
json.loadBalancer.id: 18
json.loadBalancer.id: 26
4 changes: 2 additions & 2 deletions acc-dev-testcases/data-sources/load_balancer_monitor.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
acc:
- config: |
name = "default-http-lb-monitor"
lb_id = 18
lb_id = 26
validations:
json.loadBalancerMonitor.id: 98
json.loadBalancerMonitor.id: 156
2 changes: 1 addition & 1 deletion acc-dev-testcases/data-sources/load_balancer_pool.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
acc:
- config: |
name = "PCE-testLB-Pool"
lb_id = 18
lb_id = 26
validations:
json.loadBalancerPool.id: 86
16 changes: 8 additions & 8 deletions acc-dev-testcases/data-sources/load_balancer_profile.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
acc:
- config: |
name = "default-http-lb-app-profile"
lb_id = 18
lb_id = 26
validations:
json.loadBalancerProfile.id: 215
json.loadBalancerProfile.id: 379
- config: |
name = "default-cookie-lb-persistence-profile"
lb_id = 18
lb_id = 26
validations:
json.loadBalancerProfile.id: 220
json.loadBalancerProfile.id: 385
- config: |
name = "default-balanced-server-ssl-profile"
lb_id = 18
lb_id = 26
validations:
json.loadBalancerProfile.id: 230
json.loadBalancerProfile.id: 398
- config: |
name = "default-balanced-client-ssl-profile"
lb_id = 18
lb_id = 26
validations:
json.loadBalancerProfile.id: 227
json.loadBalancerProfile.id: 393
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
acc:
- config: |
name = "sample-cert"
name = "test-cert"
validations:
json.certificates.id: 7
json.certificates.id: 9
2 changes: 1 addition & 1 deletion acc-dev-testcases/resources/instance_clone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ vars:
instance_name: tf_acc_clone_%rand_int
acc:
- config: |
source_instance_id = 1
source_instance_id = 2
name = "$(instance_name)"
network {
id = 84
Expand Down
4 changes: 2 additions & 2 deletions acc-dev-testcases/resources/load_balancer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ acc:
admin_state = true
size = "SMALL"
log_level = "INFO"
tier1_gateways = "/infra/tier-1s/9c995f68-f873-42f0-bb1b-8c5021c8f64a"
tier1_gateways = "/infra/tier-1s/b918abfd-d84b-46be-a0ac-4a64c04a5703"
}
validations:
json.loadBalancer.config.tier1: "/infra/tier-1s/9c995f68-f873-42f0-bb1b-8c5021c8f64a"
json.loadBalancer.config.tier1: "/infra/tier-1s/b918abfd-d84b-46be-a0ac-4a64c04a5703"
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ vars:
http_name: tf_HTTP_MONITOR_%rand_int
acc:
- config: |
lb_id = 18
lb_id = 26
name = "$(http_name)"
description = "HTTP_MONITOR creating using tf"
type = "LBIcmpMonitorProfile"
Expand Down
12 changes: 6 additions & 6 deletions acc-dev-testcases/resources/load_balancer_monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vars:
udp_name: tf_UDP-MONITOR_%rand_int
acc:
- config: |
lb_id = 18
lb_id = 26
name = "$(http_name)"
description = "HTTP_MONITOR creating using tf"
type = "LBHttpMonitorProfile"
Expand All @@ -27,7 +27,7 @@ acc:
validations:
json.loadBalancerMonitor.monitorType: "LBHttpMonitorProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(https_name)"
description = "HTTPS_MONITOR creating using tf"
type = "LBHttpsMonitorProfile"
Expand All @@ -47,7 +47,7 @@ acc:
validations:
json.loadBalancerMonitor.monitorType: "LBHttpsMonitorProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(icmp_name)"
description = "ICMP_MONITOR update using tf"
type = "LBIcmpMonitorProfile"
Expand All @@ -62,7 +62,7 @@ acc:
validations:
json.loadBalancerMonitor.monitorType: "LBIcmpMonitorProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(passive_name)"
description = "PASSIVE_MONITOR create using tf"
type = "LBPassiveMonitorProfile"
Expand All @@ -73,7 +73,7 @@ acc:
validations:
json.loadBalancerMonitor.monitorType: "LBPassiveMonitorProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(tcp_name)"
description = "TCP_MONITOR create using tf"
type = "LBTcpMonitorProfile"
Expand All @@ -89,7 +89,7 @@ acc:
validations:
json.loadBalancerMonitor.monitorType: "LBTcpMonitorProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(udp_name)"
description = "UDP_MONITOR create using tf"
type = "LBUdpMonitorProfile"
Expand Down
6 changes: 3 additions & 3 deletions acc-dev-testcases/resources/load_balancer_pool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ vars:
pool_name: tf_POOL_%rand_int
acc:
- config: |
lb_id = 18
lb_id = 26
name = "$(pool_name)"
description = "POOL creating using tf"
min_active_members = 1
Expand All @@ -14,11 +14,11 @@ acc:
tcp_multiplexing = false
tcp_multiplexing_number = 6
member_group {
group = "/infra/lb-pools/d3995b17-e10f-46bb-8d2b-82b42d153452"
group = "/infra/domains/default/groups/test-nework-group"
max_ip_list_size = 1
ip_revision_filter = "IPV4"
port = 80
}
}
validations:
json.loadBalancerPool.config.memberGroup.path: "/infra/lb-pools/d3995b17-e10f-46bb-8d2b-82b42d153452"
json.loadBalancerPool.config.memberGroup.path: "/infra/domains/default/groups/test-nework-group"
16 changes: 8 additions & 8 deletions acc-dev-testcases/resources/load_balancer_profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vars:
server_name: tf_SERVER-PROFILE_%rand_int
acc:
- config: |
lb_id = 18
lb_id = 26
name = "$(http_name)"
description = "HTTP_PROFILE creating using tf"
profile_type = "application-profile"
Expand All @@ -33,7 +33,7 @@ acc:
validations:
json.loadBalancerProfile.serviceType: "LBHttpProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(tcp_name)"
description = "TCP_PROFILE creating using tf"
profile_type = "application-profile"
Expand All @@ -52,7 +52,7 @@ acc:
validations:
json.loadBalancerProfile.serviceType: "LBFastTcpProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(udp_name)"
description = "UDP_PROFILE creating using tf"
profile_type = "application-profile"
Expand All @@ -70,7 +70,7 @@ acc:
validations:
json.loadBalancerProfile.serviceType: "LBFastUdpProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(cookie_name)"
description = "COOKIE_PROFILE creating using tf"
profile_type = "persistence-profile"
Expand All @@ -94,7 +94,7 @@ acc:
validations:
json.loadBalancerProfile.serviceType: "LBCookiePersistenceProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(generic_name)"
description = "GENERIC_PROFILE creating using tf"
profile_type = "persistence-profile"
Expand All @@ -113,7 +113,7 @@ acc:
validations:
json.loadBalancerProfile.serviceType: "LBGenericPersistenceProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(source_name)"
description = "SOURCE_PROFILE creating using tf"
profile_type = "persistence-profile"
Expand All @@ -133,7 +133,7 @@ acc:
validations:
json.loadBalancerProfile.serviceType: "LBSourceIpPersistenceProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(client_name)"
description = "CLIENT_PROFILE creating using tf"
profile_type = "ssl-profile"
Expand All @@ -153,7 +153,7 @@ acc:
validations:
json.loadBalancerProfile.serviceType: "LBClientSslProfile"
- config: |
lb_id = 18
lb_id = 26
name = "$(server_name)"
description = "SERVER_PROFILE creating using tf"
profile_type = "ssl-profile"
Expand Down
16 changes: 8 additions & 8 deletions acc-dev-testcases/resources/load_balancer_virtual_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ vars:
vs_name: tf_VS_%rand_int
acc:
- config: |
lb_id = 18
lb_id = 26
name = "$(vs_name)"
description = "tf_virtual-server created by tf"
vip_address = "11.10.52.14"
vip_port = "8080"
pool = 1037
pool = 120
type = "http"
http_application_profile {
application_profile = 214
application_profile = 379
}
persistence = "COOKIE"
cookie_persistence_profile {
persistence_profile = 220
persistence_profile = 385
}
ssl_server_cert = 8
ssl_server_cert = 9
ssl_server_config {
ssl_server_profile = 230
ssl_server_profile = 398
}
ssl_client_cert = 8
ssl_client_cert = 9
ssl_client_config {
ssl_client_profile = 227
ssl_client_profile = 393
}
validations:
json.loadBalancerInstance.vipProtocol: "http"
Expand Down

0 comments on commit 2419eb4

Please sign in to comment.