mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Add some behavioural tests for custom columns for custom resources
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
2ca77ecfe8
commit
978015510a
9 files changed
+815
-87
No files matched your search
@@ -141,13 +141,6 @@ export class CustomResourceDefinition extends KubeObject<
|
||||
}
|
||||
|
||||
getPreferredVersion(): CustomResourceDefinitionVersion {
|
||||
return this.getPreferedVersion();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Switch to using {@link getPreferredVersion} instead (which fixes the is a typo)
|
||||
*/
|
||||
getPreferedVersion(): CustomResourceDefinitionVersion {
|
||||
const { apiVersion } = this;
|
||||
|
||||
switch (apiVersion) {
|
||||
@@ -179,8 +172,15 @@ export class CustomResourceDefinition extends KubeObject<
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Switch to using {@link getPreferredVersion} instead (which fixes the is a typo)
|
||||
*/
|
||||
getPreferedVersion(): CustomResourceDefinitionVersion {
|
||||
return this.getPreferredVersion();
|
||||
}
|
||||
|
||||
getVersion() {
|
||||
return this.getPreferedVersion().name;
|
||||
return this.getPreferredVersion().name;
|
||||
}
|
||||
|
||||
isNamespaced() {
|
||||
@@ -200,13 +200,13 @@ export class CustomResourceDefinition extends KubeObject<
|
||||
}
|
||||
|
||||
getPrinterColumns(ignorePriority = true): AdditionalPrinterColumnsV1[] {
|
||||
const columns = this.getPreferedVersion().additionalPrinterColumns ?? [];
|
||||
const columns = this.getPreferredVersion().additionalPrinterColumns ?? [];
|
||||
|
||||
return columns.filter((column) => column.name.toLowerCase() !== "age" && (ignorePriority || !column.priority));
|
||||
}
|
||||
|
||||
getValidation() {
|
||||
return JSON.stringify(this.getPreferedVersion().schema, null, 2);
|
||||
return JSON.stringify(this.getPreferredVersion().schema, null, 2);
|
||||
}
|
||||
|
||||
getConditions() {
|
||||
|
||||
Reference in new issue
Block a user