mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
KubeObjectStore & KubeWatchApi fixes and optimizations (#2063)
* Detach NamespaceStore from KubeWatchApi, proper KubeObjectStore.loadAll (rebase of #2033) Signed-off-by: Roman <ixrock@gmail.com> * Watch-api requests optimization (#2066) * subscribe for watching resources in single request when has admin-like access rights Signed-off-by: Roman <ixrock@gmail.com> * responding to comments Signed-off-by: Roman <ixrock@gmail.com> * fix unit-tests Signed-off-by: Roman <ixrock@gmail.com> * fix: reloading stores when preloading enabled and waitUntilLoaded=false Signed-off-by: Roman <ixrock@gmail.com> * mark Cluster.canUseWatchApi() and Cluster.refreshAccessibility() as private Signed-off-by: Roman <ixrock@gmail.com> * fix unit test: make public Cluster.canUseWatchApi() Signed-off-by: Roman <ixrock@gmail.com> * responding to comments in #2066 Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
f56969a64b
commit
5287e7e528
21 files changed
+155
-101
No files matched your search
@@ -126,6 +126,7 @@ describe("create clusters", () => {
|
||||
};
|
||||
|
||||
jest.spyOn(Cluster.prototype, "isClusterAdmin").mockReturnValue(Promise.resolve(true));
|
||||
jest.spyOn(Cluster.prototype, "canUseWatchApi").mockReturnValue(Promise.resolve(true));
|
||||
jest.spyOn(Cluster.prototype, "canI")
|
||||
.mockImplementation((attr: V1ResourceAttributes): Promise<boolean> => {
|
||||
expect(attr.namespace).toBe("default");
|
||||
|
||||
Reference in new issue
Block a user