Skip to content

Commit

Permalink
automated commit
Browse files Browse the repository at this point in the history
Signed-off-by: Public copy <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Nov 13, 2024
1 parent 2b450df commit 56fca24
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
3 changes: 2 additions & 1 deletion images/keda/tests/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ resource "imagetest_feature" "basic" {
kubectl get --raw "/apis/external.metrics.k8s.io/v1beta1"
kubectl get scaledobject test-deployment -n default -o jsonpath={.status.externalMetricNames}
kubectl get --raw "/apis/external.metrics.k8s.io/v1beta1/namespaces/default/s0-cron-UTC-0,1xxxx-0,5xxxx?labelSelector=scaledobject.keda.sh%2Fname%3Dtest-deployment"
kubectl get scaledobject test-deployment -o jsonpath='{.status.health.*.status}' | grep Happy
kubectl wait --for=condition=Ready scaledobject test-deployment
kubectl wait --for=condition=Active scaledobject test-deployment
EOF
},
]
Expand Down
6 changes: 0 additions & 6 deletions images/memcached/config/main.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
terraform {
required_providers {
apko = { source = "chainguard-dev/apko" }
}
}

module "accts" { source = "../../../tflib/accts" }

variable "extra_packages" {
Expand Down
34 changes: 33 additions & 1 deletion images/memcached/tests/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,39 @@ resource "imagetest_feature" "basic" {
{
name = "Helm install"
cmd = module.helm.install_cmd
}
},
{
name = "Install netcat"
cmd = "apk add --no-cache netcat-openbsd"
},
{
name = "Start port-forward to access Memcached service on localhost"
cmd = "kubectl port-forward -n default svc/memcached 11211:11211 & "
},
{
name = "Wait for port-forwarding to establish"
cmd = "sleep 5" # Give time for the connection to establish
},
{
name = "Test Memcached functionality using nc with localhost"
cmd = <<-EOC
echo "Testing connection to Memcached at localhost:11211"
echo -e 'stats\nquit' | nc localhost 11211
EOC
assert = {
success = "STAT pid"
output_contains = [
"STAT pid",
"STAT uptime",
"STAT version",
"STAT curr_connections",
"STAT cmd_get",
"STAT bytes_read",
"STAT threads",
"STAT limit_maxbytes",
]
}
},
]

labels = {
Expand Down

0 comments on commit 56fca24

Please sign in to comment.