-
Notifications
You must be signed in to change notification settings - Fork 367
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
test: Fix LKE update test failure following feature flag update #11113
test: Fix LKE update test failure following feature flag update #11113
Conversation
import { mockAppendFeatureFlags } from 'support/intercepts/feature-flags'; | ||
|
||
const mockNodePools = nodePoolFactory.buildList(2); | ||
|
||
describe('LKE cluster updates', () => { | ||
/* | ||
* - Confirms UI flow of upgrading a cluster to high availability control plane using mocked data. | ||
* - Confirms that user is shown a warning and agrees to billing changes before upgrading. | ||
* - Confirms that details page updates accordingly after upgrading to high availability. | ||
*/ | ||
it('can upgrade to high availability', () => { | ||
const mockCluster = kubernetesClusterFactory.build({ | ||
k8s_version: latestKubernetesVersion, | ||
control_plane: { | ||
high_availability: false, | ||
}, | ||
// TODO Add LKE update tests to cover flows when APL is enabled. | ||
describe('APL disabled', () => { | ||
beforeEach(() => { | ||
// Mock the APL feature flag to be disabled. | ||
mockAppendFeatureFlags({ | ||
apl: false, | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, didn't realize how massive this diff is!
This chunk of code is the only significant difference (i.e. importing mockAppendFeatureFlags
, adding a new describe
block, and calling mockAppendFeatureFlags
in a new beforeEach
hook) -- the rest of the diff is just a result of the new indentation caused by the new describe
block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ confirmed LKE update tests passed!
(I'm starting to write tests for LKE update IP ACL changes, so good to know about this - thanks for catching!)
Coverage Report: ✅ |
Description 📝
We recently enabled the APL feature flag for development environments which triggered a test failure in
lke-update.spec.ts
. This change fixes the failing test by mocking theapl
feature flag to be disabled.Changes 🔄
List any change relevant to the reviewer.
apl
feature flag to be disabledTarget release date 🗓️
N/A
How to test 🧪
yarn cy:run -s "cypress/e2e/core/kubernetes/lke-update.spec.ts"
As an Author I have considered 🤔
Check all that apply