Skip to content

Commit

Permalink
Dont include junk revision in mock resources
Browse files Browse the repository at this point in the history
- causes MASSSIVE socket spam if the rancher revision exceeds it
  • Loading branch information
richard-cox committed Oct 31, 2024
1 parent f4db933 commit 9aaaabb
Show file tree
Hide file tree
Showing 34 changed files with 207 additions and 373 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ metadata:
time: '2023-12-07T18:14:50Z'
name: e2e-machinedeployment-name-1701972886077
namespace: default
resourceVersion: '22851'
uid: f5bf052d-7bbf-483a-a20a-b2f6e48d1e15
spec:
clusterName: local
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ metadata:
time: '2023-12-06T23:46:28Z'
name: e2e-machine-name-1701906098950
namespace: default
resourceVersion: '647485'
uid: 98380f64-0706-4522-8dc2-b91a7f012dcf
spec:
clusterName: local
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ metadata:
time: '2023-12-06T22:21:54Z'
name: e2e-machine-name-1701901308645
namespace: default
resourceVersion: '609444'
uid: 7d61939a-b44a-4113-a7d1-9db2eda08811
spec:
bootstrap:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ export const createPayloadData = {
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'
},
kind: 'PodSecurityAdmissionConfigurationTemplate',
metadata: { fields: ['e2e-pod-security-admission-1705617529465', '18s'], name: 'e2e-pod-security-admission-1705617529465' },
description: 'e2e-pod-security-admission-1705617529465-description'
};

Expand All @@ -29,9 +27,7 @@ export const updatePayloadData = {
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'
},
kind: 'PodSecurityAdmissionConfigurationTemplate',
metadata: { fields: ['e2e-pod-security-admission-1705628550961', '7s'], name: 'e2e-pod-security-admission-1705628550961' },
description: 'e2e-pod-security-admission-1705628550961-description-edit'
};
27 changes: 12 additions & 15 deletions cypress/e2e/blueprints/explorer/cluster/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ const eventsGetResponseSmallSet = {
1,
'fleet-agent-0.17d80b90a6d2c7ab'
],
name: 'fleet-agent-0.17d80b90a6d2c7ab',
namespace: 'cattle-fleet-local-system',
relationships: null,
resourceVersion: '0',
state: {
name: 'fleet-agent-0.17d80b90a6d2c7ab',
namespace: 'cattle-fleet-local-system',
relationships: null,
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand All @@ -68,11 +67,10 @@ const eventsGetResponseSmallSet = {
1,
'fleet-agent-0.17d80b90a6d2c7ab'
],
name: 'fleet-agent-0.17d80b90a6d2c7ab',
namespace: 'cattle-fleet-local-system',
relationships: null,
resourceVersion: '0',
state: {
name: 'fleet-agent-0.17d80b90a6d2c7ab',
namespace: 'cattle-fleet-local-system',
relationships: null,
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand All @@ -99,11 +97,10 @@ const eventsGetResponseSmallSet = {
1,
'fleet-agent-0.17d80b90a6d2c7ab'
],
name: 'fleet-agent-0.17d80b90a6d2c7ab',
namespace: 'cattle-fleet-local-system',
relationships: null,
resourceVersion: '0',
state: {
name: 'fleet-agent-0.17d80b90a6d2c7ab',
namespace: 'cattle-fleet-local-system',
relationships: null,
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down
11 changes: 3 additions & 8 deletions cypress/e2e/blueprints/explorer/core/service-accounts-get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const serviceAccGetResponseEmpty = {
createTypes: { serviceaccount: 'https://yonasb29.qa.rancher.space/v1/serviceaccounts' },
actions: {},
resourceType: 'serviceaccount',
revision: '129651',
count: 0,
data: []
};
Expand All @@ -17,7 +16,6 @@ const serviceAcctResponseSmallSet = {
createTypes: { serviceaccount: 'https://yonasb29.qa.rancher.space/v1/serviceaccounts' },
actions: {},
resourceType: 'serviceaccount',
revision: '129651',
count: 3,
data: [
{
Expand Down Expand Up @@ -55,8 +53,7 @@ const serviceAcctResponseSmallSet = {
state: 'succeeded'
}
],
resourceVersion: '7124',
state: {
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down Expand Up @@ -104,8 +101,7 @@ const serviceAcctResponseSmallSet = {
state: 'deployed'
}
],
resourceVersion: '9344',
state: {
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down Expand Up @@ -165,8 +161,7 @@ const serviceAcctResponseSmallSet = {
state: 'deployed'
}
],
resourceVersion: '9342',
state: {
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down
20 changes: 8 additions & 12 deletions cypress/e2e/blueprints/explorer/fleet/contents-get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const fleetContentsGetResponseEmpty = {
createTypes: { 'fleet.cattle.io.content': 'https://yonasb29head.qa.rancher.space/v1/fleet.cattle.io.contents' },
actions: {},
resourceType: 'fleet.cattle.io.content',
revision: '123',
count: 0,
data: []
};
Expand All @@ -17,7 +16,6 @@ const fleetContentsResponseSmallSet = {
createTypes: { 'fleet.cattle.io.content': 'https://yonasb29head.qa.rancher.space/v1/fleet.cattle.io.contents' },
actions: {},
resourceType: 'fleet.cattle.io.content',
revision: '123',
count: 2,
data: [
{
Expand All @@ -38,11 +36,10 @@ const fleetContentsResponseSmallSet = {
's-65075fe21d0e5087693027a2fdbb5ed559295ed1ffeb5957f98d77decb4a5',
'27h'
],
generation: 1,
name: 's-65075fe21d0e5087693027a2fdbb5ed559295ed1ffeb5957f98d77decb4a5',
relationships: null,
resourceVersion: '4380255',
state: {
generation: 1,
name: 's-65075fe21d0e5087693027a2fdbb5ed559295ed1ffeb5957f98d77decb4a5',
relationships: null,
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down Expand Up @@ -70,11 +67,10 @@ const fleetContentsResponseSmallSet = {
's-807cc7bcb0de2dae39c913c375f676238d021519258d34913ccc842519c63',
'9d'
],
generation: 1,
name: 's-807cc7bcb0de2dae39c913c375f676238d021519258d34913ccc842519c63',
relationships: null,
resourceVersion: '8041',
state: {
generation: 1,
name: 's-807cc7bcb0de2dae39c913c375f676238d021519258d34913ccc842519c63',
relationships: null,
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ const crdsGetResponseSmallSet = {
'users.management.cattle.io',
'2024-06-27T20:32:20Z'
],
generation: 1,
name: 'users.management.cattle.io',
relationships: null,
resourceVersion: '4473',
state: {
generation: 1,
name: 'users.management.cattle.io',
relationships: null,
state: {
error: false,
message: 'CRD is established',
name: 'active',
Expand Down Expand Up @@ -129,8 +128,7 @@ const crdsGetResponseSmallSet = {
state: 'deployed'
}
],
resourceVersion: '1417',
state: {
state: {
error: false,
message: 'CRD is established',
name: 'active',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const clusterRoleBindingGetResponseEmpty = {
createTypes: { 'rbac.authorization.k8s.io.clusterrolebinding': 'https://yonasb29head.qa.rancher.space/v1/rbac.authorization.k8s.io.clusterrolebindings' },
actions: {},
resourceType: 'rbac.authorization.k8s.io.clusterrolebinding',
revision: '123',
count: 0,
data: []
};
Expand All @@ -17,7 +16,6 @@ const clusterRoleBindingResponseSmallSet = {
createTypes: { 'rbac.authorization.k8s.io.clusterrolebinding': 'https://yonasb29head.qa.rancher.space/v1/rbac.authorization.k8s.io.clusterrolebindings' },
actions: {},
resourceType: 'rbac.authorization.k8s.io.clusterrolebinding',
revision: '123',
count: 2,
data: [
{
Expand Down Expand Up @@ -58,8 +56,7 @@ const clusterRoleBindingResponseSmallSet = {
state: 'deployed'
}
],
resourceVersion: '434584',
state: {
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down Expand Up @@ -118,8 +115,7 @@ const clusterRoleBindingResponseSmallSet = {
state: 'deployed'
}
],
resourceVersion: '5149',
state: {
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down
14 changes: 5 additions & 9 deletions cypress/e2e/blueprints/explorer/rbac/cluster-roles-get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const clusterRolesGetResponseEmpty = {
createTypes: { 'rbac.authorization.k8s.io.clusterrole': 'https://yonasb29h3.qa.rancher.space/v1/rbac.authorization.k8s.io.clusterroles' },
actions: {},
resourceType: 'rbac.authorization.k8s.io.clusterrole',
revision: '123',
count: 0,
data: []
};
Expand All @@ -17,7 +16,6 @@ const clusterRolesResponseSmallSet = {
createTypes: { 'rbac.authorization.k8s.io.clusterrole': 'https://yonasb29h3.qa.rancher.space/v1/rbac.authorization.k8s.io.clusterroles' },
actions: {},
resourceType: 'rbac.authorization.k8s.io.clusterrole',
revision: '123',
count: 2,
data: [
{
Expand Down Expand Up @@ -46,11 +44,10 @@ const clusterRolesResponseSmallSet = {
finalizers: [
'wrangler.cattle.io/auth-prov-v2-crole'
],
labels: { 'kubernetes.io/bootstrapping': 'rbac-defaults' },
name: 'admin',
relationships: null,
resourceVersion: '4878',
state: {
labels: { 'kubernetes.io/bootstrapping': 'rbac-defaults' },
name: 'admin',
relationships: null,
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down Expand Up @@ -94,8 +91,7 @@ const clusterRolesResponseSmallSet = {
state: 'deployed'
}
],
resourceVersion: '4838',
state: {
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down
11 changes: 3 additions & 8 deletions cypress/e2e/blueprints/explorer/rbac/role-bindings-get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const roleBindingGetResponseEmpty = {
createTypes: { 'rbac.authorization.k8s.io.rolebinding': 'https://yonasb29head.qa.rancher.space/v1/rbac.authorization.k8s.io.rolebindings' },
actions: {},
resourceType: 'rbac.authorization.k8s.io.rolebinding',
revision: '123',
count: 0,
data: []
};
Expand All @@ -17,7 +16,6 @@ const roleBindingResponseSmallSet = {
createTypes: { 'rbac.authorization.k8s.io.rolebinding': 'https://yonasb29head.qa.rancher.space/v1/rbac.authorization.k8s.io.rolebindings' },
actions: {},
resourceType: 'rbac.authorization.k8s.io.rolebinding',
revision: '123',
count: 3,
data: [
{
Expand Down Expand Up @@ -66,8 +64,7 @@ const roleBindingResponseSmallSet = {
message: 'Resource is current'
}
],
resourceVersion: '445143',
state: {
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down Expand Up @@ -134,8 +131,7 @@ const roleBindingResponseSmallSet = {
message: 'Resource is current'
}
],
resourceVersion: '4386433',
state: {
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down Expand Up @@ -203,8 +199,7 @@ const roleBindingResponseSmallSet = {
state: 'deployed'
}
],
resourceVersion: '5141',
state: {
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down
15 changes: 6 additions & 9 deletions cypress/e2e/blueprints/explorer/rbac/roles-get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const rolesResponseSmallSet = {
createTypes: { 'rbac.authorization.k8s.io.role': 'https://localhost:8005/v1/rbac.authorization.k8s.io.roles' },
actions: {},
resourceType: 'rbac.authorization.k8s.io.role',
revision: '123',
count: 2,
data: [
{
Expand Down Expand Up @@ -54,8 +53,7 @@ const rolesResponseSmallSet = {
state: 'deployed'
}
],
resourceVersion: '6958',
state: {
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down Expand Up @@ -109,12 +107,11 @@ const rolesResponseSmallSet = {
finalizers: [
'wrangler.cattle.io/auth-prov-v2-role'
],
labels: { 'kubernetes.io/bootstrapping': 'rbac-defaults' },
name: 'extension-apiserver-authentication-reader',
namespace: 'kube-system',
relationships: null,
resourceVersion: '4825',
state: {
labels: { 'kubernetes.io/bootstrapping': 'rbac-defaults' },
name: 'extension-apiserver-authentication-reader',
namespace: 'kube-system',
relationships: null,
state: {
error: false,
message: 'Resource is current',
name: 'active',
Expand Down
Loading

0 comments on commit 9aaaabb

Please sign in to comment.