1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix most tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-01-09 11:47:33 -05:00
parent 6d0e5277aa
commit d22af76e60
3 changed files with 27 additions and 3 deletions

View File

@ -0,0 +1,10 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getGlobalOverride } from "../../common/test-utils/get-global-override";
import lensProxyCertificateLifespanInjectable from "./certificate-lifespan.injectable";
// Update this value in a hundred years :D
export default getGlobalOverride(lensProxyCertificateLifespanInjectable, () => 100 * 365);

View File

@ -0,0 +1,12 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
const lensProxyCertificateLifespanInjectable = getInjectable({
id: "lens-proxy-certificate-lifespan",
instantiate: () => 365, // days
});
export default lensProxyCertificateLifespanInjectable;

View File

@ -4,14 +4,16 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { generate } from "selfsigned";
import lensProxyCertificateInjectable from "../../../common/certificate/lens-proxy-certificate.injectable";
import { beforeElectronIsReadyInjectionToken } from "../runnable-tokens/before-electron-is-ready-injection-token";
import lensProxyCertificateInjectable from "../../common/certificate/lens-proxy-certificate.injectable";
import { beforeElectronIsReadyInjectionToken } from "../start-main-application/runnable-tokens/before-electron-is-ready-injection-token";
import lensProxyCertificateLifespanInjectable from "./certificate-lifespan.injectable";
const setupLensProxyCertificateInjectable = getInjectable({
id: "setup-lens-proxy-certificate",
instantiate: (di) => {
const lensProxyCertificate = di.inject(lensProxyCertificateInjectable);
const lifespan = di.inject(lensProxyCertificateLifespanInjectable);
return {
id: "setup-lens-proxy-certificate",
@ -22,7 +24,7 @@ const setupLensProxyCertificateInjectable = getInjectable({
], {
keySize: 2048,
algorithm: "sha256",
days: 365,
days: lifespan,
extensions: [
{
name: "basicConstraints",