mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix tests not using ApplicationBuilder
- Manually set fake certificate Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
3492741b6a
commit
6dd926a0ce
5 files changed
+38
-3
No files matched your search
@@ -32,6 +32,7 @@ import type { DiContainer } from "@ogre-tools/injectable";
|
||||
import deploymentApiInjectable from "../endpoints/deployment.api.injectable";
|
||||
import podApiInjectable from "../endpoints/pod.api.injectable";
|
||||
import namespaceApiInjectable from "../endpoints/namespace.api.injectable";
|
||||
import lensProxyCertificateInjectable from "../../certificate/lens-proxy-certificate.injectable";
|
||||
|
||||
// NOTE: this is fine because we are testing something that only exported
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
@@ -48,6 +49,12 @@ describe("createKubeApiForRemoteCluster", () => {
|
||||
di.override(directoryForKubeConfigsInjectable, () => "/some-kube-configs");
|
||||
di.override(storesAndApisCanBeCreatedInjectable, () => true);
|
||||
|
||||
di.inject(lensProxyCertificateInjectable).set({
|
||||
public: "<public-data>",
|
||||
private: "<private-data>",
|
||||
cert: "<ca-data>",
|
||||
});
|
||||
|
||||
const createCluster = di.inject(createClusterInjectable);
|
||||
|
||||
di.override(hostedClusterInjectable, () => createCluster({
|
||||
|
||||
Reference in new issue
Block a user