From 1e739ba7dbf25f7d3f04cf6bff0bfa98cafe5851 Mon Sep 17 00:00:00 2001
From: Sebastian Malton
Date: Fri, 17 Jun 2022 09:19:37 -0400
Subject: [PATCH] Switch technical tests to inline matchers
Signed-off-by: Sebastian Malton
---
.../components/+config-secrets/secret-key.tsx | 8 +-
.../pod-container-env.test.tsx.snap | 154 ------------------
.../__tests__/pod-container-env.test.tsx | 14 +-
.../+workloads-pods/pod-container-env.tsx | 26 ++-
4 files changed, 32 insertions(+), 170 deletions(-)
diff --git a/src/renderer/components/+config-secrets/secret-key.tsx b/src/renderer/components/+config-secrets/secret-key.tsx
index d91a5dadc7..7bcc3bd87f 100644
--- a/src/renderer/components/+config-secrets/secret-key.tsx
+++ b/src/renderer/components/+config-secrets/secret-key.tsx
@@ -10,15 +10,15 @@ import { Icon } from "../icon";
export interface SecretKeyProps {
secret: Secret;
- key: string;
+ field: string;
}
-export const SecretKey = ({ secret, key }: SecretKeyProps) => {
+export const SecretKey = ({ secret, field }: SecretKeyProps) => {
const [showValue, setShowValue] = useState(false);
const showKey = () => setShowValue(true);
- const value = secret?.data?.[key];
+ const value = secret?.data?.[field];
if (showValue && value) {
return <>{base64.decode(value)}>;
@@ -26,7 +26,7 @@ export const SecretKey = ({ secret, key }: SecretKeyProps) => {
return (
<>
- {`secretKeyRef(${name}.${key})`}
+ {`secretKeyRef(${secret.getName()}.${field})`}
renders 1`] = `
-
-
-
- Environment
-
-
-
-
- foobar
-
- =
- https://localhost:12345
-
-
-
- configFoo
-
- =
- configBar
-
-
-
-
-
-
-
-
- Environment
-
-
-
-
- foobar
-
- =
- https://localhost:12345
-
-
-
-
-
-
-
-
- Environment
-
-
-
-
- foobar
-
- =
- https://localhost:12345
-
-
-
-
-
-
-
-
- Environment
-
-
-
-
- configFoo
-
- =
- configBar
-
-
-
-
-
-
-
-
- Environment
-
-
-
-
-