mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
test: Fix kube-api-version-detection tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
5dc94f291b
commit
43f3059c9b
@ -318,6 +318,7 @@ export class KubeApi<
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
const { apiPrefix, apiGroup, resource } = parsedApi;
|
const { apiPrefix, apiGroup, resource } = parsedApi;
|
||||||
const list = await this.request.get(`${apiPrefix}/${apiGroup}`) as KubeApiResourceVersionList;
|
const list = await this.request.get(`${apiPrefix}/${apiGroup}`) as KubeApiResourceVersionList;
|
||||||
const resourceVersions = getOrderedVersions(list, this.allowedUsableVersions?.[apiGroup]);
|
const resourceVersions = getOrderedVersions(list, this.allowedUsableVersions?.[apiGroup]);
|
||||||
@ -333,6 +334,9 @@ export class KubeApi<
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch {
|
||||||
|
// ignore exception to try next url
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Error(`Can't find working API for the Kubernetes resource ${this.apiResource}`);
|
throw new Error(`Can't find working API for the Kubernetes resource ${this.apiResource}`);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user