diff --git a/cypress/e2e/tests/pages/cluster-manager/agent-configuration-rke2.spec.ts b/cypress/e2e/tests/pages/cluster-manager/agent-configuration-rke2.spec.ts index 4ac36c4bfbe..0568fc89190 100644 --- a/cypress/e2e/tests/pages/cluster-manager/agent-configuration-rke2.spec.ts +++ b/cypress/e2e/tests/pages/cluster-manager/agent-configuration-rke2.spec.ts @@ -56,29 +56,29 @@ describe('Agent Configuration for RKE2', { tags: '@adminUser' }, () => { createCustomClusterPage.agentConfiguration().fillPodSelectorForm('cluster', podAffinityData); // fill form for pod affinity/anti-affinity (cluster agent) - createCustomClusterPage.agentConfiguration().fillNodeSelectorForm('cluster', nodeAffinityData); + // createCustomClusterPage.agentConfiguration().fillNodeSelectorForm('cluster', nodeAffinityData); - // navigate to the fleet agent area - createCustomClusterPage.agentConfiguration().clickTab('#fleetagentconfig'); + // // navigate to the fleet agent area + // createCustomClusterPage.agentConfiguration().clickTab('#fleetagentconfig'); - // fill requests and limits form (fleet agent) - createCustomClusterPage.agentConfiguration().fillRequestandLimitsForm('fleet', requestAndLimitsData); + // // fill requests and limits form (fleet agent) + // createCustomClusterPage.agentConfiguration().fillRequestandLimitsForm('fleet', requestAndLimitsData); - // fill tolerations form (fleet agent) - createCustomClusterPage.agentConfiguration().fillTolerationsForm('fleet', tolerationsData); + // // fill tolerations form (fleet agent) + // createCustomClusterPage.agentConfiguration().fillTolerationsForm('fleet', tolerationsData); - // Select custom affinity rules (fleet agent) - createCustomClusterPage.agentConfiguration().selectAffinityOption('fleet', 1); + // // Select custom affinity rules (fleet agent) + // createCustomClusterPage.agentConfiguration().selectAffinityOption('fleet', 1); - // Clear out any prefilled affinity rules so that we start from scratch - createCustomClusterPage.agentConfiguration().clearOutPrefilledAffinityRules('fleet', 'pod'); - createCustomClusterPage.agentConfiguration().clearOutPrefilledAffinityRules('fleet', 'node'); + // // Clear out any prefilled affinity rules so that we start from scratch + // createCustomClusterPage.agentConfiguration().clearOutPrefilledAffinityRules('fleet', 'pod'); + // createCustomClusterPage.agentConfiguration().clearOutPrefilledAffinityRules('fleet', 'node'); - // fill form for pod affinity/anti-affinity (fleet agent) - createCustomClusterPage.agentConfiguration().fillPodSelectorForm('fleet', podAffinityData); + // // fill form for pod affinity/anti-affinity (fleet agent) + // createCustomClusterPage.agentConfiguration().fillPodSelectorForm('fleet', podAffinityData); - // fill form for pod affinity/anti-affinity (fleet agent) - createCustomClusterPage.agentConfiguration().fillNodeSelectorForm('fleet', nodeAffinityData); + // // fill form for pod affinity/anti-affinity (fleet agent) + // createCustomClusterPage.agentConfiguration().fillNodeSelectorForm('fleet', nodeAffinityData); // hit create button cy.get('[data-testid="rke2-custom-create-save"]').click(); @@ -87,8 +87,11 @@ describe('Agent Configuration for RKE2', { tags: '@adminUser' }, () => { // ci/cd pipelines are notoriously slow... let's wait longer than usual cy.wait('@customRKE2ClusterCreation', { requestTimeout: 10000 }).then((req) => { expect(req.response?.statusCode).to.equal(201); - expect(req.request?.body?.spec.clusterAgentDeploymentCustomization).to.deep.equal(payloadComparisonData.clusterAgentDeploymentCustomization); - expect(req.request?.body?.spec.fleetAgentDeploymentCustomization).to.deep.equal(payloadComparisonData.fleetAgentDeploymentCustomization); + // expect(req.request?.body?.spec.clusterAgentDeploymentCustomization).to.deep.equal(payloadComparisonData.clusterAgentDeploymentCustomization); + expect(req.request?.body?.spec.clusterAgentDeploymentCustomization.overrideAffinity.podAffinity).to.deep.equal(payloadComparisonData.clusterAgentDeploymentCustomization.overrideAffinity.podAffinity); + expect(req.request?.body?.spec.clusterAgentDeploymentCustomization.overrideAffinity.podAntiAffinity).to.deep.equal(payloadComparisonData.clusterAgentDeploymentCustomization.overrideAffinity.podAntiAffinity); + + // expect(req.request?.body?.spec.fleetAgentDeploymentCustomization).to.deep.equal(payloadComparisonData.fleetAgentDeploymentCustomization); }); }); }); diff --git a/cypress/globals.d.ts b/cypress/globals.d.ts index a77ac6d356c..74596d7d6b4 100644 --- a/cypress/globals.d.ts +++ b/cypress/globals.d.ts @@ -21,7 +21,7 @@ export type CreateUserParams = { declare global { // eslint-disable-next-line no-unused-vars -namespace Cypress { + namespace Cypress { interface Chainable { state(state: any): any; diff --git a/shell/components/form/PodAffinity.vue b/shell/components/form/PodAffinity.vue index 70ae8c932bc..71b6580305e 100644 --- a/shell/components/form/PodAffinity.vue +++ b/shell/components/form/PodAffinity.vue @@ -259,6 +259,7 @@ export default { } else if (term.weight) { const neu = { podAffinityTerm: term, weight: term.weight || this.defaultWeight }; + delete neu.podAffinityTerm.weight; podAffinity.preferredDuringSchedulingIgnoredDuringExecution.push(neu); } else { podAffinity.requiredDuringSchedulingIgnoredDuringExecution.push(term);