forked from rancher/dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* actions on cluster tests * initial iteration for cluster drivers tests * node drivers tests * rke templates tests * cloud credentials tests and initial node templates tests * completed node templates tests * pod security admissions and policy templates * MachineDeployments MachineSets and Machines tests * repositories tests * filter out tests with @Jenkins tag
- Loading branch information
1 parent
af5731a
commit b189f8e
Showing
72 changed files
with
2,824 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
cypress/e2e/blueprints/cluster_management/machine-deployments-edit.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineDeployment | ||
metadata: | ||
creationTimestamp: '2023-12-07T18:14:50Z' | ||
generation: 1 | ||
labels: | ||
cluster.x-k8s.io/cluster-name: local | ||
managedFields: | ||
- apiVersion: cluster.x-k8s.io/v1beta1 | ||
fieldsType: FieldsV1 | ||
fieldsV1: | ||
f:spec: | ||
.: {} | ||
f:clusterName: {} | ||
f:selector: {} | ||
f:template: | ||
.: {} | ||
f:metadata: {} | ||
f:spec: | ||
.: {} | ||
f:clusterName: {} | ||
manager: rancher | ||
operation: Update | ||
time: '2023-12-07T18:14:50Z' | ||
name: e2e-machinedeployment-name-1701972886077 | ||
namespace: default | ||
resourceVersion: '22851' | ||
uid: f5bf052d-7bbf-483a-a20a-b2f6e48d1e15 | ||
spec: | ||
clusterName: local | ||
minReadySeconds: 0 | ||
progressDeadlineSeconds: 600 | ||
replicas: 1 | ||
revisionHistoryLimit: 1 | ||
selector: | ||
matchLabels: | ||
cluster.x-k8s.io/cluster-name: local | ||
cluster.x-k8s.io/deployment-name: e2e-machinedeployment-name-1701972886077 | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 1 | ||
maxUnavailable: 0 | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/cluster-name: local | ||
cluster.x-k8s.io/deployment-name: e2e-machinedeployment-name-1701972886077 | ||
spec: | ||
bootstrap: {} | ||
clusterName: local | ||
infrastructureRef: {} |
65 changes: 65 additions & 0 deletions
65
cypress/e2e/blueprints/cluster_management/machine-deployments.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineDeployment | ||
metadata: | ||
name: e2etest | ||
namespace: default | ||
# annotations: key: string | ||
# labels: key: string | ||
spec: | ||
selector: | ||
matchLabels:# key: string | ||
# matchExpressions: | ||
# - key: string | ||
# operator: string | ||
# values: | ||
# - string | ||
template: | ||
metadata: | ||
labels:# key: string | ||
# annotations: key: string | ||
# generateName: string | ||
# name: string | ||
# namespace: string | ||
# ownerReferences: | ||
# - apiVersion: string | ||
# blockOwnerDeletion: boolean | ||
# controller: boolean | ||
# kind: string | ||
# name: string | ||
# uid: string | ||
spec: | ||
# bootstrap: | ||
# configRef: | ||
# apiVersion: string | ||
# fieldPath: string | ||
# kind: string | ||
# name: string | ||
# namespace: string | ||
# resourceVersion: string | ||
# uid: string | ||
# data: string | ||
# dataSecretName: string | ||
clusterName: local | ||
# failureDomain: string | ||
# infrastructureRef: | ||
# apiVersion: string | ||
# fieldPath: string | ||
# kind: string | ||
# name: string | ||
# namespace: string | ||
# resourceVersion: string | ||
# uid: string | ||
# nodeDrainTimeout: string | ||
# providerID: string | ||
# version: string | ||
clusterName: local | ||
# minReadySeconds: int | ||
# paused: boolean | ||
# progressDeadlineSeconds: int | ||
# replicas: int | ||
# revisionHistoryLimit: int | ||
# strategy: | ||
# type: string | ||
# rollingUpdate: | ||
# maxSurge: json | ||
# maxUnavailable: json |
44 changes: 44 additions & 0 deletions
44
cypress/e2e/blueprints/cluster_management/machine-sets-edit.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineSet | ||
metadata: | ||
creationTimestamp: '2023-12-06T23:41:44Z' | ||
generation: 3 | ||
labels: | ||
cluster.x-k8s.io/cluster-name: local | ||
managedFields: | ||
- apiVersion: cluster.x-k8s.io/v1beta1 | ||
fieldsType: FieldsV1 | ||
fieldsV1: | ||
f:spec: | ||
.: {} | ||
f:clusterName: {} | ||
f:replicas: {} | ||
f:selector: {} | ||
f:template: | ||
.: {} | ||
f:metadata: {} | ||
f:spec: | ||
.: {} | ||
f:clusterName: {} | ||
manager: rancher | ||
operation: Update | ||
time: '2023-12-06T23:46:28Z' | ||
name: e2e-machine-name-1701906098950 | ||
namespace: default | ||
resourceVersion: '647485' | ||
uid: 98380f64-0706-4522-8dc2-b91a7f012dcf | ||
spec: | ||
clusterName: local | ||
deletePolicy: Random | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
cluster.x-k8s.io/set-name: e2e-machine-name-1701906098950 | ||
template: | ||
metadata: | ||
labels: | ||
cluster.x-k8s.io/set-name: e2e-machine-name-1701906098950 | ||
spec: | ||
bootstrap: {} | ||
clusterName: local | ||
infrastructureRef: {} |
58 changes: 58 additions & 0 deletions
58
cypress/e2e/blueprints/cluster_management/machine-sets.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: MachineSet | ||
metadata: | ||
name: e2etest | ||
namespace: default | ||
# annotations: key: string | ||
# labels: key: string | ||
spec: | ||
selector: | ||
matchLabels:# key: string | ||
# matchExpressions: | ||
# - key: string | ||
# operator: string | ||
# values: | ||
# - string | ||
template: | ||
metadata: | ||
labels:# key: string | ||
# annotations: key: string | ||
# generateName: string | ||
# name: string | ||
# namespace: string | ||
# ownerReferences: | ||
# - apiVersion: string | ||
# blockOwnerDeletion: boolean | ||
# controller: boolean | ||
# kind: string | ||
# name: string | ||
# uid: string | ||
spec: | ||
bootstrap: | ||
# configRef: | ||
# apiVersion: string | ||
# fieldPath: string | ||
# kind: string | ||
# name: string | ||
# namespace: string | ||
# resourceVersion: string | ||
# uid: string | ||
# data: string | ||
dataSecretName: secretName | ||
clusterName: local | ||
# failureDomain: string | ||
# infrastructureRef: | ||
# apiVersion: string | ||
# fieldPath: string | ||
# kind: string | ||
# name: string | ||
# namespace: string | ||
# resourceVersion: string | ||
# uid: string | ||
# nodeDrainTimeout: string | ||
# providerID: string | ||
# version: string | ||
clusterName: local | ||
# deletePolicy: string | ||
# minReadySeconds: int | ||
# replicas: int |
33 changes: 33 additions & 0 deletions
33
cypress/e2e/blueprints/cluster_management/machines-edit.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Machine | ||
metadata: | ||
creationTimestamp: '2023-12-06T22:21:54Z' | ||
generation: 1 | ||
labels: | ||
cluster.x-k8s.io/cluster-name: local | ||
managedFields: | ||
- apiVersion: cluster.x-k8s.io/v1beta1 | ||
fieldsType: FieldsV1 | ||
fieldsV1: | ||
f:spec: | ||
.: {} | ||
f:bootstrap: | ||
.: {} | ||
f:dataSecretName: {} | ||
f:clusterName: {} | ||
f:infrastructureRef: {} | ||
manager: rancher | ||
operation: Update | ||
time: '2023-12-06T22:21:54Z' | ||
name: e2e-machine-name-1701901308645 | ||
namespace: default | ||
resourceVersion: '609444' | ||
uid: 7d61939a-b44a-4113-a7d1-9db2eda08811 | ||
spec: | ||
bootstrap: | ||
dataSecretName: secretname | ||
clusterName: local | ||
infrastructureRef: | ||
namespace: default | ||
resourceVersion: abc123 | ||
nodeDeletionTimeout: 10s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Machine | ||
metadata: | ||
name: string | ||
namespace: default | ||
# annotations: key: string | ||
# labels: key: string | ||
spec: | ||
bootstrap: | ||
# configRef: | ||
# apiVersion: string | ||
# fieldPath: string | ||
# kind: string | ||
# name: string | ||
# namespace: string | ||
# resourceVersion: string | ||
# uid: string | ||
# data: string | ||
dataSecretName: secretname | ||
clusterName: local | ||
# failureDomain: string | ||
# infrastructureRef: | ||
# apiVersion: string | ||
# fieldPath: string | ||
# kind: string | ||
# name: string | ||
# namespace: string | ||
# resourceVersion: string | ||
# uid: string | ||
# nodeDrainTimeout: string | ||
# providerID: string | ||
# version: string |
37 changes: 37 additions & 0 deletions
37
cypress/e2e/blueprints/cluster_management/pod-security-admissions-payload.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
export const createPayloadData = { | ||
id: 'e2e-pod-security-admission-1705617529465', | ||
type: 'management.cattle.io.podsecurityadmissionconfigurationtemplate', | ||
apiVersion: 'management.cattle.io/v3', | ||
configuration: { | ||
defaults: { | ||
audit: 'baseline', 'audit-version': 'latest', enforce: 'privileged', 'enforce-version': 'latest', warn: 'restricted', 'warn-version': 'latest' | ||
}, | ||
exemptions: { | ||
usernames: ['admin', 'user'], runtimeClasses: ['myclass1', 'myclass2'], namespaces: ['ingress-nginx', 'kube-system'] | ||
} | ||
}, | ||
kind: 'PodSecurityAdmissionConfigurationTemplate', | ||
metadata: { | ||
fields: ['e2e-pod-security-admission-1705617529465', '18s'], name: 'e2e-pod-security-admission-1705617529465', resourceVersion: '831667' | ||
}, | ||
description: 'e2e-pod-security-admission-1705617529465-description' | ||
}; | ||
|
||
export const updatePayloadData = { | ||
id: 'e2e-pod-security-admission-1705628550961', | ||
type: 'management.cattle.io.podsecurityadmissionconfigurationtemplate', | ||
apiVersion: 'management.cattle.io/v3', | ||
configuration: { | ||
defaults: { | ||
audit: 'baseline', 'audit-version': 'v1.25', enforce: 'privileged', 'enforce-version': 'v1.25', warn: 'restricted', 'warn-version': 'v1.25' | ||
}, | ||
exemptions: { | ||
usernames: ['admin1', 'user1'], runtimeClasses: ['myclass3', 'myclass4'], namespaces: ['cattle-system', 'cattle-epinio-system'] | ||
} | ||
}, | ||
kind: 'PodSecurityAdmissionConfigurationTemplate', | ||
metadata: { | ||
fields: ['e2e-pod-security-admission-1705628550961', '7s'], name: 'e2e-pod-security-admission-1705628550961', resourceVersion: '938739' | ||
}, | ||
description: 'e2e-pod-security-admission-1705628550961-description-edit' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,26 @@ | ||
import ComponentPo from '@/cypress/e2e/po/components/component.po'; | ||
import AsyncButtonPo from '@/cypress/e2e/po/components/async-button.po'; | ||
|
||
export default class CruResourcePo extends ComponentPo { | ||
selectSubType(groupIndex: number, itemIndex: number) { | ||
return this.self().find('.subtypes-container > div') | ||
.eq(groupIndex).find('.item') | ||
.eq(itemIndex); | ||
} | ||
|
||
selectSubTypeByIndex(index: number) { | ||
return this.self().find('.subtypes-container > div') | ||
.eq(index); | ||
} | ||
|
||
saveOrCreate(): AsyncButtonPo { | ||
return new AsyncButtonPo('[data-testid="form-save"]', this.self()); | ||
} | ||
|
||
saveAndWaitForRequests(method: string, url: string) { | ||
cy.intercept(method, url).as('request'); | ||
this.saveOrCreate().click(); | ||
|
||
return cy.wait('@request', { timeout: 10000 }); | ||
} | ||
} |
Oops, something went wrong.