Skip to content

Commit 272dab7

Browse files
committed
Fix getComponentTypeVersion method tests
Signed-off-by: Denis Golovin <dgolovin@redhat.com>
1 parent e38a1cf commit 272dab7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/odo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ export class OdoImpl implements Odo {
697697

698698
public async getComponentTypeVersions(componentName: string): Promise<string[]> {
699699
const result: cliInstance.CliExitData = await this.execute(Command.listCatalogComponentsJson());
700-
const items = this.loadItems<ComponentType>(result).filter((value) => value.metadata.name === componentName);
700+
const items = this.loadItems<ComponentType>(result, (json) => json.s2iItems).filter((value) => value.metadata.name === componentName);
701701
return items.length > 0 ? items[0].spec.allTags : [];
702702
}
703703

test/unit/odo.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ suite("odo", () => {
448448
const odoCatalog = JSON.stringify({
449449
kind : "ComponentTypeList",
450450
apiVersion : "odo.openshift.io/v1alpha1",
451-
items: [
451+
s2iItems: [
452452
{
453453
kind : "ComponentType",
454454
apiVersion : "odo.openshift.io/v1alpha1",

0 commit comments

Comments
 (0)