[bitnami/cassandra] test: Increase ginkgo test timeout

Signed-off-by: Javier J. Salmerón García <javier.salmeron@broadcom.com>
This commit is contained in:
Javier J. Salmerón García
2024-09-04 12:43:03 +02:00
parent 72b8c26fe1
commit a6ee96a47c
10 changed files with 669 additions and 2 deletions
@@ -31,7 +31,7 @@ func init() {
flag.StringVar(&namespace, "namespace", "", "namespace where the application is running")
flag.StringVar(&username, "username", "", "database user")
flag.StringVar(&password, "password", "", "database password for username")
flag.IntVar(&timeoutSeconds, "timeout", 300, "timeout in seconds")
flag.IntVar(&timeoutSeconds, "timeout", 600, "timeout in seconds")
timeout = time.Duration(timeoutSeconds) * time.Second
}
+7
View File
@@ -0,0 +1,7 @@
module.exports = {
defaultCommandTimeout: 90000,
e2e: {
setupNodeEvents(on, config) {},
baseUrl: 'http://35.196.250.6',
},
}
@@ -0,0 +1,18 @@
/*
* Copyright Broadcom, Inc. All Rights Reserved.
* SPDX-License-Identifier: APACHE-2.0
*/
/// <reference types="cypress" />
// We check the pushed trace in the Job
it('should find pushed trace', () => {
cy.visit('/')
cy.contains('a', 'Dependencies').click();
cy.fixture('services').then((service) => {
cy.contains('div[class*="root"]', 'Start Time').get('input').eq(2).clear().type(service.checkTime);
cy.contains('button', 'Run Query').click();
cy.get('[role="combobox"]').click();
cy.contains(service.name);
});
})
@@ -0,0 +1,4 @@
{
"name": "yelp-main",
"checkTime": "09/03/2014 10:55:26"
}
@@ -0,0 +1,25 @@
/*
* Copyright Broadcom, Inc. All Rights Reserved.
* SPDX-License-Identifier: APACHE-2.0
*/
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
// import './commands';
// Alternatively you can use CommonJS syntax:
// require('./commands')
+48
View File
@@ -0,0 +1,48 @@
# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
http:
http://127.0.0.1:{{ .Vars.containerPorts.http }}/api/v2/services:
status: 200
body:
- /yelp-main/
http://zipkin:{{ .Vars.service.server.ports.http }}/api/v2/services:
status: 200
body:
- /yelp-main/
http://127.0.0.1:{{ .Vars.containerPorts.http }}/prometheus:
status: 200
body:
- /armeria_server/
http://zipkin:{{ .Vars.service.server.ports.http }}/prometheus:
status: 200
body:
- /armeria_server/
command:
{{- $uid := .Vars.containerSecurityContext.runAsUser }}
{{- $gid := .Vars.podSecurityContext.fsGroup }}
check-user-info:
# The UID and GID should always be either the one specified as vars (always a bigger number that the default)
# or the one randomly defined by openshift (larger values). Otherwise, the chart is still using the default value.
exec: if [ $(id -u) -lt {{ $uid }} ] || [ $(id -G | awk '{print $2}') -lt {{ $gid }} ]; then exit 1; fi
exit-status: 0
check-configured-env-vars:
exec: env
exit-status: 0
stdout:
- /AUTOCOMPLETE_TTL.*{{ .Vars.configOverrides.AUTOCOMPLETE_TTL }}/
{{- if not .Vars.usePasswordFile }}
# The secret configuration should be set via env
- /QUERY_NAMES_MAX_AGE.*{{ .Vars.secretConfigOverrides.QUERY_NAMES_MAX_AGE }}/
{{- end }}
{{- if .Vars.usePasswordFile }}
# The secret configuration should be mounted as a file
file:
/bitnami/zipkin/secrets/configuration/QUERY_NAMES_MAX_AGE:
exists: true
filetype: symlink
contents:
- /{{ .Vars.secretConfigOverrides.QUERY_NAMES_MAX_AGE }}/
{{- end }}
+460
View File
@@ -0,0 +1,460 @@
podSecurityContext:
fsGroup: 1002
containerSecurityContext:
runAsUser: 1002
containerPorts:
http: 6555
usePasswordFile: true
configOverrides:
AUTOCOMPLETE_TTL: 1000000
secretConfigOverrides:
QUERY_NAMES_MAX_AGE: 280
replicaCount: 1
service:
type: LoadBalancer
ports:
http: 80
metrics:
enabled: true
extraDeploy:
# Job to push some data to the Zipkin instance
- |
apiVersion: batch/v1
kind: Job
metadata:
name: zipkin-add-data
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: zipkin-job
image: docker.io/bitnami/os-shell:latest
command:
- /bin/bash
args:
- -ec
- |
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
# Set the endpoint URL
host=zipkin
port={{ .Values.service.ports.http }}
retry_while() {
local -r cmd="${1:?cmd is missing}"
local -r retries="${2:-12}"
local -r sleep_time="${3:-5}"
local return_value=1
read -r -a command <<< "$cmd"
for ((i = 1 ; i <= retries ; i+=1 )); do
"${command[@]}" && return_value=0 && break
sleep "$sleep_time"
done
return $return_value
}
zipkin_ready() {
# Test the TCP connection with a timeout
if timeout 5 bash -c "</dev/tcp/$host/$port"; then
return 0
else
return 1
fi
}
echo "Waiting for the Nessie instance"
if ! retry_while "zipkin_ready" 12 30; then
echo "Could not connect to the Zipkin instance"
exit 1
else
echo "Zipkin ready! Running job"
curl -X POST http://zipkin:$port/api/v2/spans -H'Content-Type: application/json' -d @/sampledata/yelp.json
fi
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.containerSecurityContext "context" $) | nindent 12 }}
volumeMounts:
- name: tmp
mountPath: /tmp
subPath: tmp-dir
- name: sample-data
mountPath: /sampledata
volumes:
- name: tmp
emptyDir: {}
- name: sample-data
configMap:
name: zipkin-test-data
# ConfigMap with the sample data
- |
apiVersion: v1
kind: ConfigMap
metadata:
name: zipkin-test-data
data:
# Taken from https://github.com/openzipkin/zipkin/blob/master/zipkin-lens/testdata/yelp.json
yelp.json: |
[
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "f5f268651b2a2b34",
"id": "15fc03927f0f68df",
"kind": "CLIENT",
"name": "post",
"timestamp": 1571896375322000,
"duration": 14000,
"localEndpoint": {
"serviceName": "mobile_api"
},
"remoteEndpoint": {
"serviceName": "blt",
"port": 31882
},
"tags": {
"client_status_code": "200",
"http.uri.client": "/visits",
"request_budget": "9980",
"tracer": "syslog2scribe.haproxy-synapse"
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "f5f268651b2a2b34",
"id": "7a778764a0d0b594",
"kind": "CLIENT",
"name": "get",
"timestamp": 1571896375310000,
"duration": 3000,
"localEndpoint": {
"serviceName": "mobile_api"
},
"remoteEndpoint": {
"serviceName": "spectre",
"port": 31286
},
"tags": {
"client_status_code": "200",
"http.uri.client": "/visits",
"request_budget": "9989",
"tracer": "syslog2scribe.haproxy-synapse"
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "f5f268651b2a2b34",
"id": "7a778764a0d0b594",
"kind": "SERVER",
"name": "get",
"timestamp": 1571896375310740,
"duration": 1490,
"localEndpoint": {
"serviceName": "spectre"
},
"tags": {
"ecosystem": "prod",
"habitat": "uswest1aprod",
"http.uri.client": "/token/abcdefgh123456",
"region": "uswest1-prod"
},
"shared": true
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "f5f268651b2a2b34",
"id": "6a65182ea4f684c3",
"kind": "CLIENT",
"name": "set mobile_api_nonce",
"timestamp": 1571896375302030,
"duration": 1026,
"localEndpoint": {
"serviceName": "mobile_api",
"port": 31049
},
"remoteEndpoint": {
"serviceName": "memcache"
},
"tags": {
"driver": "yelp_memcache",
"method": "set",
"requests": "1",
"system": "mobile_api_nonce",
"ttl": ""
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "f5f268651b2a2b34",
"id": "cb4d73f31cd90cae",
"kind": "CLIENT",
"name": "get_multi mobile_api_nonce",
"timestamp": 1571896375300642,
"duration": 1066,
"localEndpoint": {
"serviceName": "mobile_api",
"port": 31049
},
"remoteEndpoint": {
"serviceName": "memcache"
},
"tags": {
"driver": "yelp_memcache",
"hits": "0",
"method": "get_multi",
"requests": "1",
"system": "mobile_api_nonce"
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "2e8cfb154b59a41f",
"id": "f5f268651b2a2b34",
"kind": "SERVER",
"name": "post /location/update/v4",
"timestamp": 1571896375297103,
"duration": 41740,
"localEndpoint": {
"serviceName": "mobile_api",
"port": 31049
},
"tags": {
"ecosystem": "prod",
"habitat": "uswest1bprod",
"http.route": "/location/update/v4",
"http.uri": "/location/update/v4",
"http.uri.qs": "/location/update/v4",
"region": "uswest1-prod",
"response_status_code": "200",
"version_SHA": "6535284b1699df0a766384a648dc95c462a7313d"
},
"shared": true
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "2e8cfb154b59a41f",
"id": "f5f268651b2a2b34",
"kind": "CLIENT",
"name": "post",
"timestamp": 1571896375287000,
"duration": 56000,
"localEndpoint": {
"serviceName": "yelp-main"
},
"remoteEndpoint": {
"serviceName": "mobile_api",
"port": 31049
},
"tags": {
"client_status_code": "200",
"http.uri.client": "/location/update/v4",
"request_budget": "10003",
"tracer": "syslog2scribe.haproxy-synapse"
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "241cea1aa4cb2884",
"id": "0facde7c9130fd93",
"kind": "CLIENT",
"name": "get_multi my_cache_name_v1",
"timestamp": 1571896375272125,
"duration": 233,
"localEndpoint": {
"serviceName": "yelp-main",
"port": 31523
},
"remoteEndpoint": {
"serviceName": "memcache"
},
"tags": {
"driver": "core_memcache",
"hits": "1",
"method": "get_multi",
"requests": "1"
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "241cea1aa4cb2884",
"id": "50b57281525a99d8",
"kind": "CLIENT",
"name": "commit",
"timestamp": 1571896375272604,
"duration": 374,
"localEndpoint": {
"serviceName": "yelp-main",
"port": 31523
},
"remoteEndpoint": {
"serviceName": "mysql"
},
"tags": {
"query": "COMMIT"
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "241cea1aa4cb2884",
"id": "2b68987704862c4f",
"kind": "CLIENT",
"name": "get user_details_cache-20150901",
"timestamp": 1571896375270438,
"duration": 1068,
"localEndpoint": {
"serviceName": "yelp-main",
"port": 31523
},
"remoteEndpoint": {
"serviceName": "memcache"
},
"tags": {
"driver": "core_memcache",
"hits": "1",
"method": "get",
"requests": "1"
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "668ed78ad94b35a1",
"id": "241cea1aa4cb2884",
"name": "txn: user_get_basic_and_scout_info",
"timestamp": 1571896375269210,
"duration": 3884,
"localEndpoint": {
"serviceName": "yelp-main",
"port": 31523
},
"tags": {
"calling_method": "src/logic/db/user.py:1234:get_user"
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "241cea1aa4cb2884",
"id": "b593cd7513dc736e",
"kind": "CLIENT",
"name": "begin",
"timestamp": 1571896375269732,
"duration": 445,
"localEndpoint": {
"serviceName": "yelp-main",
"port": 31523
},
"remoteEndpoint": {
"serviceName": "mysql"
},
"tags": {
"query": "************"
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "668ed78ad94b35a1",
"id": "e7d1a2d5a788ac81",
"kind": "CLIENT",
"name": "get my_cache_name_v2",
"timestamp": 1571896375268015,
"duration": 993,
"localEndpoint": {
"serviceName": "yelp-main",
"port": 31523
},
"remoteEndpoint": {
"serviceName": "memcache"
},
"tags": {
"driver": "core_memcache",
"hits": "1",
"method": "get",
"requests": "1"
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "2e8cfb154b59a41f",
"id": "668ed78ad94b35a1",
"kind": "SERVER",
"name": "post api proxy proxy",
"timestamp": 1571896375264995,
"duration": 88935,
"localEndpoint": {
"serviceName": "yelp_main/api_proxy",
"port": 31523
},
"annotations": [
{
"timestamp": 1571896375355436,
"value": "py_zipkin.logging_end"
}
],
"tags": {
"cprofile_enabled": "False",
"datacenter": "us-west-1",
"ecosystem": "prod",
"habitat": "uswest1aprod",
"host": "<host>",
"http.route": "/*path",
"http.uri": "/location/update/v4",
"http.uri.qs": "/location/update/v4",
"locale": "en_US",
"logged_in": "False",
"natural": "False",
"owner_email": "",
"paasta": "True",
"region": "uswest1-prod",
"request_budget": "10003",
"request_budget_soft": "5003",
"response_status_code": "200",
"servlet": "proxy",
"servlet_action": "proxy",
"site": "api",
"version_SHA": "5e83958d2c"
},
"shared": true
},
{
"traceId": "a03ee8fff1dcd9b9",
"parentId": "2e8cfb154b59a41f",
"id": "668ed78ad94b35a1",
"kind": "CLIENT",
"name": "post",
"timestamp": 1571896375239000,
"duration": 125000,
"localEndpoint": {
"serviceName": "unknown"
},
"remoteEndpoint": {
"serviceName": "yelp-main.mobile_api",
"port": 31523
},
"tags": {
"client_status_code": "200",
"http.uri.client": "/location/update/v4",
"request_budget": "10003",
"tracer": "syslog2scribe.envoy"
}
},
{
"traceId": "a03ee8fff1dcd9b9",
"id": "2e8cfb154b59a41f",
"kind": "SERVER",
"name": "post /location/update/v4",
"timestamp": 1571896375237354,
"duration": 131848,
"localEndpoint": {
"serviceName": "routing"
},
"tags": {
"ecosystem": "prod",
"habitat": "uswest1aprod",
"http.uri.client": "/location/update/v4",
"region": "uswest1-prod",
"response_status_code": "200"
},
"shared": true
}
]
+38
View File
@@ -0,0 +1,38 @@
{
"phases": {
"package": {
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/zipkin"
}
},
"actions": [
{
"action_id": "helm-package"
},
{
"action_id": "helm-lint"
}
]
},
"publish": {
"actions": [
{
"action_id": "helm-publish",
"params": {
"repository": {
"kind": "S3",
"url": "{VIB_ENV_S3_URL}",
"authn": {
"access_key_id": "{VIB_ENV_S3_ACCESS_KEY_ID}",
"secret_access_key": "{VIB_ENV_S3_SECRET_ACCESS_KEY}",
"role": "{VIB_ENV_S3_ROLE_ARN}"
}
}
}
}
]
}
}
}
+67
View File
@@ -0,0 +1,67 @@
{
"phases": {
"package": {
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/zipkin"
}
},
"actions": [
{
"action_id": "helm-package"
},
{
"action_id": "helm-lint"
}
]
},
"verify": {
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/zipkin"
},
"target_platform": {
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
"size": {
"name": "M4"
}
}
},
"actions": [
{
"action_id": "goss",
"params": {
"resources": {
"path": "/.vib"
},
"tests_file": "zipkin/goss/goss.yaml",
"vars_file": "zipkin/runtime-parameters.yaml",
"remote": {
"pod": {
"workload": "deploy-zipkin"
}
}
}
},
{
"action_id": "cypress",
"params": {
"resources": {
"path": "/.vib/zipkin/cypress"
},
"endpoint": "lb-zipkin-http",
"app_protocol": "HTTP"
}
},
{
"action_id": "kubescape",
"params": {
"threshold": {VIB_ENV_KUBESCAPE_SCORE_THRESHOLD}
}
}
]
}
}
}
+1 -1
View File
@@ -32,4 +32,4 @@ maintainers:
name: cassandra
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/cassandra
version: 11.4.1
version: 11.4.2