Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Neuvector spec to extension compatibility tests #11692

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: check-plugins-build
on:
pull_request:
branches:
- master
- master-banans
env:
TEST_PERSIST_BUILD: true
jobs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docusaurus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches:
- master
pull_request:
branches:
- master
# pull_request:
# branches:
# - master
jobs:
build:
name: Build
Expand Down
55 changes: 31 additions & 24 deletions .github/workflows/extensions-compatibility-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Extensions Compatibility Tests
on:
schedule:
- cron: "0 0 * * *" # runs at midnight every day
# TO DELETE!!!!!!!
pull_request:
branches:
- master

env:
TEST_USERNAME: admin
Expand All @@ -22,10 +26,13 @@ jobs:
{ username: 'admin', tag: '@adminUser' }
]
features: [
['@elemental', 'elemental']
['@elemental', 'elemental'],
['@kubewarden', 'kubewarden'],
['@neuvector', 'neuvector'],
]
rancherEnv: [
['2.10', 'v2.9-head'],
# ['2.10', 'v2.10-befdf11fc6753ed4a2322b28c5f3ebe7f47e4d96-head'],
['2.9', 'v2.9-head'],
# ['2.9', 'v2.9-head']
]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -66,26 +73,26 @@ jobs:
name: ${{github.run_number}}-${{github.run_attempt}}-extensions-compatibility-tests-screenshots-${{ matrix.role.tag }}+${{ matrix.features[0] }}
path: cypress/screenshots

# Slack message with outcome - success
- name: Slack message in workflow success
env:
SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: success()
shell: bash
run: |
curl -X POST \
-H "Content-type: application/json; charset=utf-8" \
--data '{"name": "${{ matrix.rancherEnv[0] }} - image:${{ matrix.rancherEnv[1] }} - ${{ matrix.features[1] }}", "status": "Workflow succedded! ✅", "workflow_run": ${{ github.run_id }} }' \
$SLACK_URL
# # Slack message with outcome - success
# - name: Slack message in workflow success
# env:
# SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# if: success()
# shell: bash
# run: |
# curl -X POST \
# -H "Content-type: application/json; charset=utf-8" \
# --data '{"name": "${{ matrix.rancherEnv[0] }} - image:${{ matrix.rancherEnv[1] }} - ${{ matrix.features[1] }}", "status": "Workflow succedded! ✅", "workflow_run": ${{ github.run_id }} }' \
# $SLACK_URL

# Slack message with outcome - failure
- name: Slack message in workflow failure
env:
SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
shell: bash
run: |
curl -X POST \
-H "Content-type: application/json; charset=utf-8" \
--data '{"name": "${{ matrix.rancherEnv[0] }} - image:${{ matrix.rancherEnv[1] }} - ${{ matrix.features[1] }}", "status": "Workflow failed! 🆘", "workflow_run": ${{ github.run_id }} }' \
$SLACK_URL
# # Slack message with outcome - failure
# - name: Slack message in workflow failure
# env:
# SLACK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# if: failure()
# shell: bash
# run: |
# curl -X POST \
# -H "Content-type: application/json; charset=utf-8" \
# --data '{"name": "${{ matrix.rancherEnv[0] }} - image:${{ matrix.rancherEnv[1] }} - ${{ matrix.features[1] }}", "status": "Workflow failed! 🆘", "workflow_run": ${{ github.run_id }} }' \
# $SLACK_URL
6 changes: 3 additions & 3 deletions .github/workflows/storybook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
push:
branches:
- master
pull_request:
branches:
- master
# pull_request:
# branches:
# - master
jobs:
storybook:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
branches:
- master
- 'release-*'
pull_request:
branches:
- master
- 'release-*'
# pull_request:
# branches:
# - master
# - 'release-*'
workflow_dispatch:
inputs:
environment:
Expand Down
6 changes: 4 additions & 2 deletions cypress/e2e/po/components/kubectl.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ export default class Kubectl extends ComponentPo {
* @param command Kube command without the 'kubectl'
* @returns executeCommand for method chanining
*/
executeCommand(command: string, wait = 3000) {
this.self().get(this.terminalRow).type(`${ this.kubeCommand } ${ command }{enter}`);
executeCommand(command: string, prependKubectl = true, wait = 3000) {
const parsedCommand = prependKubectl ? `${ this.kubeCommand } ${ command }{enter}` : `${ command }{enter}`;

this.self().get(this.terminalRow).type(parsedCommand);
cy.wait(wait);

return this;
Expand Down
5 changes: 5 additions & 0 deletions cypress/e2e/po/components/name-ns-description.po.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ComponentPo from '@/cypress/e2e/po/components/component.po';
import LabeledInputPo from '@/cypress/e2e/po/components/labeled-input.po';
import LabeledSelectPo from '@/cypress/e2e/po/components/labeled-select.po';

export default class NameNsDescription extends ComponentPo {
name() {
Expand All @@ -13,4 +14,8 @@ export default class NameNsDescription extends ComponentPo {
project() {
return new LabeledInputPo(this.self().find('[data-testid="name-ns-description-project"] input'));
}

namespace() {
return new LabeledSelectPo(this.self().find('[data-testid="name-ns-description-namespace"]'));
}
}
27 changes: 27 additions & 0 deletions cypress/e2e/po/edit/ingress.po.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import PagePo from '@/cypress/e2e/po/pages/page.po';
import NameNsDescription from '@/cypress/e2e/po/components/name-ns-description.po';
import ResourceDetailPo from '@/cypress/e2e/po/edit/resource-detail.po';

export default class IngressEditPagePo extends PagePo {
private static createPath(clusterId: string, id?: string ) {
const root = `/c/${ clusterId }/explorer/networking.k8s.io.ingress`;

return id ? `${ root }/${ id }?mode=edit` : `${ root }/create`;
}

goTo(clusterId: string, id?: string): Cypress.Chainable<Cypress.AUTWindow> {
return super.goTo(IngressEditPagePo.createPath(clusterId, id));
}

constructor(clusterId = 'local', id?: string) {
super(IngressEditPagePo.createPath(clusterId, id));
}

nameNsDescription() {
return new NameNsDescription(this.self());
}

saveCreateForm(): ResourceDetailPo {
return new ResourceDetailPo(this.self());
}
}
Loading
Loading