Skip to content

Commit

Permalink
Add test duration and fix job names in destroy workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
zalbiraw committed Apr 25, 2024
1 parent 711bd3f commit 9ce7337
Show file tree
Hide file tree
Showing 17 changed files with 64 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/aks-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
kubectl config rename-context $(kubectl config current-context) performance-testing-aks
- name: Run Tests
- name: Destroy Tests
run: |
cd tests
terraform init
Expand All @@ -89,7 +89,7 @@ jobs:
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
--auto-approve
- name: Deploy testing resources
- name: Destroy testing resources
run: |
cd deployments
terraform init
Expand All @@ -105,7 +105,7 @@ jobs:
--var="grafana_service_type=LoadBalancer" \
--auto-approve
- name: Stand up AKS cluster
- name: Destroy AKS cluster
run: |
cd aks
terraform init
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/aks-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ on:
required: false
default: false
type: boolean
tests_duration:
description: 'Duration of Tests in Minutes'
required: false
default: 15
type: number

jobs:
performance_test:
Expand Down Expand Up @@ -57,6 +62,7 @@ jobs:
--var="kubernetes_config_context=performance-testing-aks" \
--var="tests_timestamp_enabled=${{ inputs.tests_timestamp_enabled }}" \
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
--var="tests_duration=${{ inputs.tests_duration }}" \
--auto-approve
- name: Access to Grafana Dashboard
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ on:
required: false
default: false
type: boolean
tests_duration:
description: 'Duration of Tests in Minutes'
required: false
default: 15
type: number

jobs:
performance_test:
Expand Down Expand Up @@ -112,6 +117,7 @@ jobs:
--var="kubernetes_config_context=performance-testing-aks" \
--var="tests_timestamp_enabled=${{ inputs.tests_timestamp_enabled }}" \
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
--var="tests_duration=${{ inputs.tests_duration }}" \
--auto-approve
- name: Access to Grafana Dashboard
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/eks-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
kubectl config rename-context $(kubectl config current-context) performance-testing-eks
- name: Run Tests
- name: Destroy Tests
run: |
cd tests
terraform init
Expand All @@ -89,7 +89,7 @@ jobs:
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
--auto-approve
- name: Deploy testing resources
- name: Destroy testing resources
run: |
cd deployments
terraform init
Expand All @@ -105,7 +105,7 @@ jobs:
--var="grafana_service_type=LoadBalancer" \
--auto-approve
- name: Stand up EKS cluster
- name: Destroy EKS cluster
run: |
cd eks
terraform init
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/eks-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ on:
required: false
default: false
type: boolean
tests_duration:
description: 'Duration of Tests in Minutes'
required: false
default: 15
type: number

jobs:
performance_test:
Expand Down Expand Up @@ -57,6 +62,7 @@ jobs:
--var="kubernetes_config_context=performance-testing-eks" \
--var="tests_timestamp_enabled=${{ inputs.tests_timestamp_enabled }}" \
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
--var="tests_duration=${{ inputs.tests_duration }}" \
--auto-approve
- name: Access to Grafana Dashboard
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ on:
required: false
default: false
type: boolean
tests_duration:
description: 'Duration of Tests in Minutes'
required: false
default: 15
type: number

jobs:
performance_test:
Expand Down Expand Up @@ -112,6 +117,7 @@ jobs:
--var="kubernetes_config_context=performance-testing-eks" \
--var="tests_timestamp_enabled=${{ inputs.tests_timestamp_enabled }}" \
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
--var="tests_duration=${{ inputs.tests_duration }}" \
--auto-approve
- name: Access to Grafana Dashboard
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gke-destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
kubectl config rename-context $(kubectl config current-context) performance-testing-gke
- name: Run Tests
- name: Destroy Tests
run: |
cd tests
terraform init
Expand All @@ -103,7 +103,7 @@ jobs:
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
--auto-approve
- name: Deploy testing resources
- name: Destroy testing resources
run: |
cd deployments
terraform init
Expand All @@ -119,7 +119,7 @@ jobs:
--var="grafana_service_type=LoadBalancer" \
--auto-approve
- name: Stand up GKE cluster
- name: Destroy GKE cluster
run: |
cd gke
terraform init
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/gke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ on:
required: false
default: false
type: boolean
tests_duration:
description: 'Duration of Tests in Minutes'
required: false
default: 15
type: number

jobs:
tests:
Expand Down Expand Up @@ -63,6 +68,7 @@ jobs:
--var="kubernetes_config_context=performance-testing-gke" \
--var="tests_timestamp_enabled=${{ inputs.tests_timestamp_enabled }}" \
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
--var="tests_duration=${{ inputs.tests_duration }}" \
--auto-approve
- name: Access to Grafana Dashboard
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ on:
required: false
default: false
type: boolean
tests_duration:
description: 'Duration of Tests in Minutes'
required: false
default: 15
type: number

jobs:
performance_test:
Expand Down Expand Up @@ -127,6 +132,7 @@ jobs:
--var="kubernetes_config_context=performance-testing-gke" \
--var="tests_timestamp_enabled=${{ inputs.tests_timestamp_enabled }}" \
--var="tests_httpbin_enabled=${{ inputs.tests_httpbin_enabled }}" \
--var="tests_duration=${{ inputs.tests_duration }}" \
--auto-approve
- name: Access to Grafana Dashboard
Expand Down
2 changes: 1 addition & 1 deletion modules/tests/httpbin/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const options = {
executor: 'constant-vus',
exec: 'success',
vus: 50,
duration: '15m',
duration: '${var.duration}m',
}
}
};
Expand Down
4 changes: 4 additions & 0 deletions modules/tests/httpbin/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ variable "url" {
variable "parallelism" {
type = number
}

variable "duration" {
type = number
}
2 changes: 1 addition & 1 deletion modules/tests/timestamp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const options = {
executor: 'constant-vus',
exec: 'get',
vus: 50,
duration: '15m',
duration: '${var.duration}m',
}
}
};
Expand Down
4 changes: 4 additions & 0 deletions modules/tests/timestamp/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ variable "url" {
variable "parallelism" {
type = number
}

variable "duration" {
type = number
}
1 change: 1 addition & 0 deletions modules/tests/vars.tests.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ variable "tests" {
parallelism = number
timestamp = bool
httpbin = bool
duration = number
})
}
1 change: 1 addition & 0 deletions tests/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ module "tests" {
parallelism = var.tests_parallelism
timestamp = var.tests_timestamp_enabled
httpbin = var.tests_httpbin_enabled
duration = var.tests_duration
}
}
3 changes: 2 additions & 1 deletion tests/main.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ gravitee_enabled = false

tests_parallelism = 4
tests_timestamp_enabled = true
tests_httpbin_enabled = false
tests_httpbin_enabled = false
tests_duration = 15
5 changes: 5 additions & 0 deletions tests/vars.tests.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ variable "tests_httpbin_enabled" {
type = bool
default = false
}

variable "tests_duration" {
type = number
default = 15
}

0 comments on commit 9ce7337

Please sign in to comment.