Skip to content

Commit

Permalink
Style fixes
Browse files Browse the repository at this point in the history
Signed-off-by: jorturfer <jorge_turrado@hotmail.es>
  • Loading branch information
JorTurFer committed Aug 4, 2021
1 parent 79c94c2 commit e679b92
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ issues:
- path: scale_resolvers_test.go
linters:
- staticcheck
- path: kubernetes_workload_scaler_test.go
linters:
- staticcheck
# https://github.com/go-critic/go-critic/issues/926
- linters:
- gocritic
Expand Down
18 changes: 9 additions & 9 deletions tests/scalers/kubernetes-workload.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ test.serial(`Deployment should scale to fit the amount of pods which match the s
`kubectl scale deployment.apps/monitored-deployment --namespace ${testNamespace} --replicas=5`
)
t.true(await waitForDeploymentReplicaCount(5, 'sut-deployment', testNamespace, 6, 10000), 'Replica count should be 5 after 60 seconds')

sh.exec(
`kubectl scale deployment.apps/monitored-deployment --namespace ${testNamespace} --replicas=10`
)
t.true(await waitForDeploymentReplicaCount(10, 'sut-deployment', testNamespace, 6, 10000), 'Replica count should be 10 after 60 seconds')

sh.exec(
`kubectl scale deployment.apps/monitored-deployment --namespace ${testNamespace} --replicas=5`
)
t.true(await waitForDeploymentReplicaCount(5, 'sut-deployment', testNamespace, 6, 10000), 'Replica count should be 5 after 60 seconds')

sh.exec(
`kubectl scale deployment.apps/monitored-deployment --namespace ${testNamespace} --replicas=1`
)
Expand All @@ -59,15 +59,15 @@ test.serial(`Deployment should scale to fit the amount of pods which match the s

test.after.always.cb('clean up workload test related deployments', t => {
const resources = [
'scaledobject.keda.sh/sut-scaledobject',
'scaledobject.keda.sh/sut-scaledobject',
'deployment.apps/sut-deployment',
'deployment.apps/monitored-deployment',
]

for (const resource of resources) {
sh.exec(`kubectl delete ${resource} --namespace ${testNamespace}`)
}
sh.exec(`kubectl delete namespace ${testNamespace}`)
sh.exec(`kubectl delete namespace ${testNamespace}`)
t.end()
})

Expand Down Expand Up @@ -122,14 +122,14 @@ spec:
cooldownPeriod: 5
minReplicaCount: 1
maxReplicaCount: 10
advanced:
horizontalPodAutoscalerConfig:
behavior:
advanced:
horizontalPodAutoscalerConfig:
behavior:
scaleDown:
stabilizationWindowSeconds: 15
triggers:
- type: kubernetes-workload
metadata:
metadata:
podSelector: 'pod=workload-test'
namespace: ${testNamespace}
value: '1'`

0 comments on commit e679b92

Please sign in to comment.