[bitnami/thanos] Revisit tests (#14343)

* [bitnami/thanos] Revisit tests

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Use localhost as placeholder

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Rename spec file

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Remove thanos extra ci-pipeline

Signed-off-by: FraPazGal <fdepaz@vmware.com>

Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
Francisco de Paz Galan
2023-01-26 09:33:55 +01:00
committed by GitHub
parent f64c2ccfb1
commit b055f10692
15 changed files with 47 additions and 201 deletions

View File

@@ -1,36 +0,0 @@
# Multiple deployments pipelines are custom per asset. All single deployments pipelines are handled by ci-pipeline.yaml
name: '[CI/CD] CI Pipeline extra Thanos'
on: # rebuild any PRs and main branch changes
pull_request_target:
types:
- reopened
- synchronize
- labeled
branches:
- main
paths:
- 'bitnami/thanos/*'
env:
CSP_API_URL: https://console.cloud.vmware.com
CSP_API_TOKEN: ${{ secrets.CSP_API_TOKEN }}
VIB_PUBLIC_URL: https://cp.bromelia.vmware.com
jobs:
vib-verify-bucketweb:
# Given performance issues of the action feature on GH's side, we need to be very restrictive in the job's triggers:
# -> The pipeline was triggered due to a label addition and said label was the 'verify' one OR
# -> The pipeline was NOT triggered due to a label addition but the PR already contains the 'verify' one
if: |
github.event.action == 'labeled' && github.event.label.name == 'verify' ||
github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'verify')
runs-on: ubuntu-latest
name: Verify BucketWeb on Tanzu Kubernetes Grid
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- uses: vmware-labs/vmware-image-builder-action@main
with:
pipeline: thanos/bucketweb/vib-verify.json
env:
VIB_ENV_TARGET_PLATFORM: ${{ secrets.VIB_ENV_TARGET_PLATFORM }}

View File

@@ -1,4 +0,0 @@
{
"baseUrl": "http://localhost",
"defaultCommandTimeout": 40000
}

View File

@@ -1,19 +0,0 @@
/// <reference types="cypress" />
it('allows to see runtime & build information', () => {
cy.visit('/');
cy.contains('.dropdown-toggle', 'Status').click();
cy.contains('[class="dropdown-item"]', 'Runtime & Build Information').click();
cy.contains('Runtime Information');
cy.get('h2').contains('Build Information');
cy.contains('.capitalize-title', 'version').siblings().should('not.be.empty'); //check if there is value for app and Go Version
cy.contains('.capitalize-title', 'goVersion')
.siblings()
.should('not.be.empty');
});
it('allows to see the Blocks page', () => {
cy.visit('/');
cy.get('.nav-link').contains('Blocks').click();
cy.contains('No blocks found.');
});

View File

@@ -1,13 +0,0 @@
const COMMAND_DELAY = 2000;
for (const command of ['click']) {
Cypress.Commands.overwrite(command, (originalFn, ...args) => {
const origVal = originalFn(...args);
return new Promise((resolve) => {
setTimeout(() => {
resolve(origVal);
}, COMMAND_DELAY);
});
});
}

View File

@@ -1,20 +0,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')

View File

@@ -1,54 +0,0 @@
{
"phases": {
"package": {
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/thanos"
}
},
"actions": [
{
"action_id": "helm-package"
},
{
"action_id": "helm-lint"
}
]
},
"verify": {
"context": {
"resources": {
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/thanos"
},
"runtime_parameters": "b2Jqc3RvcmVDb25maWc6IHwtCiAgdHlwZTogRklMRVNZU1RFTQogIGNvbmZpZzoKICAgIGRpcmVjdG9yeTogIi8iCgpidWNrZXR3ZWI6CiAgZW5hYmxlZDogdHJ1ZQogIHNlcnZpY2U6CiAgICB0eXBlOiBMb2FkQmFsYW5jZXIKICAgIHBvcnRzOgogICAgICBodHRwOiA4MA==",
"target_platform": {
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
"size": {
"name": "M4"
}
}
},
"actions": [
{
"action_id": "health-check",
"params": {
"endpoint": "lb-thanos-bucketweb-http",
"app_protocol": "HTTP"
}
},
{
"action_id": "cypress",
"params": {
"resources": {
"path": "/.vib/thanos/bucketweb/cypress"
},
"endpoint": "lb-thanos-bucketweb-http",
"app_protocol": "HTTP"
}
}
]
}
}
}

View File

@@ -0,0 +1,8 @@
{
"baseUrl": "http://localhost/",
"defaultCommandTimeout": 60000,
"env": {
"storePort": "10903",
"receivePort": "10904"
}
}

View File

@@ -0,0 +1,22 @@
/// <reference types="cypress" />
it('allows the execution of a query', () => {
const QUERY_KEYWORD = 'vector';
const QUERY_VALUE = '3000';
cy.visit('/graph');
cy.contains('.alert', 'No data queried').should('be.visible');
cy.get('.cm-line').type(`${QUERY_KEYWORD}(${QUERY_VALUE})`, '{enter}');
cy.get('.execute-btn').click();
cy.contains('.tab-content', QUERY_VALUE);
});
it('allows listing all installed stores', () => {
cy.visit('/stores');
cy.contains('tr', Cypress.env('storePort')).within(() => {
cy.get('[data-testid="health"]').contains('UP');
});
cy.contains('tr', Cypress.env('receivePort')).within(() => {
cy.get('[data-testid="health"]').contains('UP');
});
});

View File

@@ -1,4 +0,0 @@
{
"baseUrl": "http://localhost/",
"defaultCommandTimeout": 40000
}

View File

@@ -1,42 +0,0 @@
/// <reference types="cypress" />
it('allows to see runtime & build information', () => {
cy.visit('/');
cy.contains('.dropdown-toggle', 'Status').click();
cy.contains('[class="dropdown-item"]', 'Runtime & Build Information').click();
cy.contains('Runtime Information');
cy.contains('h2', 'Build Information');
cy.contains('.capitalize-title', 'version').siblings().should('not.be.empty'); //check if there is value for app and Go Version
cy.contains('.capitalize-title', 'goVersion')
.siblings()
.should('not.be.empty');
});
it('allows the execution of a query', () => {
const QUERY_ALERT = 'No data queried yet';
const QUERY_KEYWORD = 'vector';
const QUERY_VALUE = '3000';
cy.visit('/graph');
cy.contains('.alert', QUERY_ALERT);
cy.get('.cm-line')
.type(QUERY_KEYWORD, '{enter}')
.type(`(${QUERY_VALUE})`)
.click();
cy.get('.execute-btn').click();
cy.contains('.tab-content', QUERY_VALUE);
});
it('allows listing all installed stores', () => {
cy.visit('/');
cy.contains('[class="nav-link"]', 'Stores').click();
cy.get('[data-testid="endpoint"]').should('not.be.empty');
cy.get('[data-testid="health"]').contains('UP');
});
it('allows adding a graph', () => {
cy.visit('/');
cy.contains('button', 'Add Panel').click();
cy.get('.execute-btn').should('have.length', 2);
});

View File

@@ -22,7 +22,7 @@
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/thanos"
},
"runtime_parameters": "b2Jqc3RvcmVDb25maWc6IHwtCiAgdHlwZTogRklMRVNZU1RFTQogIGNvbmZpZzoKICAgIGRpcmVjdG9yeTogIi8iCgpxdWVyeUZyb250ZW5kOgogIGVuYWJsZWQ6IHRydWUKICBzZXJ2aWNlOgogICAgdHlwZTogTG9hZEJhbGFuY2VyCiAgICBwb3J0czoKICAgICAgaHR0cDogODAKCnN0b3JlZ2F0ZXdheToKICBlbmFibGVkOiB0cnVlCg==",
"runtime_parameters": "b2Jqc3RvcmVDb25maWc6IHwtCiAgdHlwZTogczMKICBjb25maWc6CiAgICBidWNrZXQ6IHRoYW5vcy10ZXN0CiAgICBlbmRwb2ludDoge3sgaW5jbHVkZSAidGhhbm9zLm1pbmlvLmZ1bGxuYW1lIiAuIH19Lnt7IC5SZWxlYXNlLk5hbWVzcGFjZSB9fS5zdmMuY2x1c3Rlci5sb2NhbDo5MDAwCiAgICBhY2Nlc3Nfa2V5OiBtaW5pby12aWIKICAgIHNlY3JldF9rZXk6IG1pbmlvMTIzCiAgICBpbnNlY3VyZTogdHJ1ZQptaW5pbzoKICBlbmFibGVkOiB0cnVlCiAgYXV0aDoKICAgIHJvb3RVc2VyOiAibWluaW8tdmliIgogICAgcm9vdFBhc3N3b3JkOiAibWluaW8xMjMiCiAgZGVmYXVsdEJ1Y2tldHM6ICJ0aGFub3MtdGVzdCIKICBzZXJ2aWNlOgogICAgcG9ydHM6CiAgICAgIGFwaTogOTAwMApxdWVyeToKICBlbmFibGVkOiB0cnVlCnF1ZXJ5RnJvbnRlbmQ6CiAgZW5hYmxlZDogdHJ1ZQogIHNlcnZpY2U6CiAgICB0eXBlOiBMb2FkQmFsYW5jZXIKICAgIHBvcnRzOgogICAgICBodHRwOiA4MApidWNrZXR3ZWI6CiAgZW5hYmxlZDogdHJ1ZQpzdG9yZWdhdGV3YXk6CiAgZW5hYmxlZDogdHJ1ZQogIHNlcnZpY2U6CiAgICBwb3J0czoKICAgICAgZ3JwYzogMTA5MDMKcmVjZWl2ZToKICBlbmFibGVkOiB0cnVlCiAgc2VydmljZToKICAgIHBvcnRzOgogICAgICBncnBjOiAxMDkwNA==",
"target_platform": {
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
"size": {
@@ -42,10 +42,14 @@
"action_id": "cypress",
"params": {
"resources": {
"path": "/.vib/thanos/queryfrontend/cypress"
"path": "/.vib/thanos/cypress"
},
"endpoint": "lb-thanos-query-frontend-http",
"app_protocol": "HTTP"
"app_protocol": "HTTP",
"env": {
"storePort": "10903",
"receivePort": "10904"
}
}
}
]

View File

@@ -22,7 +22,7 @@
"url": "{SHA_ARCHIVE}",
"path": "/bitnami/thanos"
},
"runtime_parameters": "b2Jqc3RvcmVDb25maWc6IHwtCiAgdHlwZTogRklMRVNZU1RFTQogIGNvbmZpZzoKICAgIGRpcmVjdG9yeTogIi8iCgpxdWVyeUZyb250ZW5kOgogIGVuYWJsZWQ6IHRydWUKICBzZXJ2aWNlOgogICAgdHlwZTogTG9hZEJhbGFuY2VyCiAgICBwb3J0czoKICAgICAgaHR0cDogODAKCnN0b3JlZ2F0ZXdheToKICBlbmFibGVkOiB0cnVlCg==",
"runtime_parameters": "b2Jqc3RvcmVDb25maWc6IHwtCiAgdHlwZTogczMKICBjb25maWc6CiAgICBidWNrZXQ6IHRoYW5vcy10ZXN0CiAgICBlbmRwb2ludDoge3sgaW5jbHVkZSAidGhhbm9zLm1pbmlvLmZ1bGxuYW1lIiAuIH19Lnt7IC5SZWxlYXNlLk5hbWVzcGFjZSB9fS5zdmMuY2x1c3Rlci5sb2NhbDo5MDAwCiAgICBhY2Nlc3Nfa2V5OiBtaW5pby12aWIKICAgIHNlY3JldF9rZXk6IG1pbmlvMTIzCiAgICBpbnNlY3VyZTogdHJ1ZQptaW5pbzoKICBlbmFibGVkOiB0cnVlCiAgYXV0aDoKICAgIHJvb3RVc2VyOiAibWluaW8tdmliIgogICAgcm9vdFBhc3N3b3JkOiAibWluaW8xMjMiCiAgZGVmYXVsdEJ1Y2tldHM6ICJ0aGFub3MtdGVzdCIKICBzZXJ2aWNlOgogICAgcG9ydHM6CiAgICAgIGFwaTogOTAwMApxdWVyeToKICBlbmFibGVkOiB0cnVlCnF1ZXJ5RnJvbnRlbmQ6CiAgZW5hYmxlZDogdHJ1ZQogIHNlcnZpY2U6CiAgICB0eXBlOiBMb2FkQmFsYW5jZXIKICAgIHBvcnRzOgogICAgICBodHRwOiA4MApidWNrZXR3ZWI6CiAgZW5hYmxlZDogdHJ1ZQpzdG9yZWdhdGV3YXk6CiAgZW5hYmxlZDogdHJ1ZQogIHNlcnZpY2U6CiAgICBwb3J0czoKICAgICAgZ3JwYzogMTA5MDMKcmVjZWl2ZToKICBlbmFibGVkOiB0cnVlCiAgc2VydmljZToKICAgIHBvcnRzOgogICAgICBncnBjOiAxMDkwNA==",
"target_platform": {
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
"size": {
@@ -42,10 +42,14 @@
"action_id": "cypress",
"params": {
"resources": {
"path": "/.vib/thanos/queryfrontend/cypress"
"path": "/.vib/thanos/cypress"
},
"endpoint": "lb-thanos-query-frontend-http",
"app_protocol": "HTTP"
"app_protocol": "HTTP",
"env": {
"storePort": "10903",
"receivePort": "10904"
}
}
}
]

View File

@@ -1316,7 +1316,7 @@ objstoreConfig: |-
type: s3
config:
bucket: thanos
endpoint: {{ include "thanos.minio.fullname" . }}.monitoring.svc.cluster.local:9000
endpoint: {{ include "thanos.minio.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:9000
access_key: minio
secret_key: minio123
insecure: true
@@ -1347,7 +1347,7 @@ metrics:
minio:
enabled: true
auth:
rootUser: "admin"
rootUser: "minio"
rootPassword: "minio123"
defaultBuckets: "thanos"
```
@@ -1630,4 +1630,4 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.