Skip to content

Commit

Permalink
fix: fixed hpa/health-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
c_jean.silva committed Oct 5, 2024
1 parent 5fa83f0 commit a349a46
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 6 additions & 1 deletion kubernetes/4-hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ spec:
name: cpu
target:
type: Utilization
averageUtilization: 80
averageUtilization: 50
behavior:
scaleDown:
stabilizationWindowSeconds: 30
scaleUp:
stabilizationWindowSeconds: 0
4 changes: 2 additions & 2 deletions tests/scenarios/infra/health-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export function ShouldBeGetVerifyApplicationIsHealthy() {
"Content-Type": "application/json"
},
post() {
pm.test('should be return status code 200 when making the get customers', () => pm.response.to.have.status(200))
pm.test('should be return in less than 1s when call the get customers', () => pm.expect(pm.response.responseTime).to.be.below(1000))
pm.test('should be return status code 200 when making the get health check', () => pm.response.to.have.status(200))
pm.test('should be return in less than 1s when call the get health check', () => pm.expect(pm.response.responseTime).to.be.below(1000))
}
});
}
Expand Down
6 changes: 3 additions & 3 deletions tests/stress-testing/infra-flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ export const options = {
scenarios: {
healthCheck: {
executor: 'ramping-vus',
startVUs: 1,
startVUs: 50,
stages: [
{ duration: '1m', target: 50 },
{ duration: '2m', target: 50 },
{ duration: '1m', target: 100 },
{ duration: '1m', target: 200 },
{ duration: '1m', target: 1 },
],
gracefulRampDown: '1s',
Expand Down

0 comments on commit a349a46

Please sign in to comment.