forked from linode/manager
-
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.
feat: [M3-8837] - Add LKE-E feature flag (linode#11259)
* Add lkeEnterprise flag, hook, and account beta query * Add WIP tests for hook * Refactor added tests, trying to address failures * Different attempt for debugging purposes; will likely revert this * Fix the APL test error and some linter warnings * Add changesets * Address feedback: add MSW preset for LKE-E account capability
- Loading branch information
Showing
13 changed files
with
234 additions
and
12 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
packages/api-v4/.changeset/pr-11259-upcoming-features-1731690339160.md
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,5 @@ | ||
--- | ||
"@linode/api-v4": Upcoming Features | ||
--- | ||
|
||
Add v4beta/account endpoint and update Capabilities for LKE-E ([#11259](https://github.com/linode/manager/pull/11259)) |
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
5 changes: 5 additions & 0 deletions
5
packages/manager/.changeset/pr-11259-upcoming-features-1731690367042.md
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,5 @@ | ||
--- | ||
"@linode/manager": Upcoming Features | ||
--- | ||
|
||
Add feature flag and hook for LKE-E enablement ([#11259](https://github.com/linode/manager/pull/11259)) |
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
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
33 changes: 33 additions & 0 deletions
33
packages/manager/src/mocks/presets/extra/account/lkeEnterpriseEnabled.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,33 @@ | ||
// New file at `src/mocks/presets/extra/account/lkeEnterpriseEnabled.ts` or similar | ||
|
||
import { http } from 'msw'; | ||
|
||
import { accountFactory } from 'src/factories'; | ||
import { makeResponse } from 'src/mocks/utilities/response'; | ||
|
||
import type { MockPresetExtra } from 'src/mocks/types'; | ||
|
||
const mockLkeEnabledCapability = () => { | ||
return [ | ||
http.get('*/v4*/account', async ({ request }) => { | ||
return makeResponse( | ||
accountFactory.build({ | ||
capabilities: [ | ||
// Other account capabilities might be necessary here, too... | ||
// TODO Make a `defaultAccountCapabilities` factory. | ||
'Kubernetes', | ||
'Kubernetes Enterprise', | ||
], | ||
}) | ||
); | ||
}), | ||
]; | ||
}; | ||
|
||
export const lkeEnterpriseEnabledPreset: MockPresetExtra = { | ||
desc: 'Mock account with LKE Enterprise capability', | ||
group: { id: 'Account', type: 'select' }, | ||
handlers: [mockLkeEnabledCapability], | ||
id: 'account:lke-enterprise-enabled', | ||
label: 'LKE Enterprise Enabled', | ||
}; |
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
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