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

Fix tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-08-31 14:33:30 -04:00
parent 343ef9a21c
commit 963114a933
2 changed files with 7 additions and 7 deletions

View File

@ -57,7 +57,7 @@ const NonInjectedContainerEnvFromSource = ({
data-testid={`envFrom-${kind}-${testIdName}`}
>
<span className="var-name">{fieldName}</span>
{`= `}
{` = `}
{value}
</div>
);

View File

@ -91,7 +91,7 @@ describe("<ContainerEnv />", () => {
});
const result = render(<ContainerEnvironment container={container} namespace={pod.getNs()} />);
expect(result.getByTestId("env-foobar")).toHaveTextContent(`foobar= https://localhost:12345`);
expect(result.getByTestId("env-foobar")).toHaveTextContent(`foobar = https://localhost:12345`);
});
it("renders envFrom when given a configMapRef", () => {
@ -140,7 +140,7 @@ describe("<ContainerEnv />", () => {
});
const result = render(<ContainerEnvironment container={container} namespace={pod.getNs()} />);
expect(result.getByTestId("envFrom-configmap-my-config-map:configFoo")).toHaveTextContent(`configFoo= configBar`);
expect(result.getByTestId("envFrom-configmap-my-config-map:configFoo")).toHaveTextContent(`configFoo = configBar`);
});
it("renders envFrom when given a secretRef", () => {
@ -190,7 +190,7 @@ describe("<ContainerEnv />", () => {
});
const result = render(<ContainerEnvironment container={container} namespace={pod.getNs()} />);
expect(result.getByTestId("envFrom-secret-my-secret:bar")).toHaveTextContent(/^bar= secretKeyRef\(my-secret\.bar\)/);
expect(result.getByTestId("envFrom-secret-my-secret:bar")).toHaveTextContent(/^bar = secretKeyRef\(my-secret\.bar\)/);
});
it("renders env", () => {
@ -218,7 +218,7 @@ describe("<ContainerEnv />", () => {
});
const result = render(<ContainerEnvironment container={container} namespace={pod.getNs()} />);
expect(result.getByTestId("env-foobar")).toHaveTextContent(`foobar= https://localhost:12345`);
expect(result.getByTestId("env-foobar")).toHaveTextContent(`foobar = https://localhost:12345`);
});
it("renders both env and configMapRef envFrom", () => {
@ -271,7 +271,7 @@ describe("<ContainerEnv />", () => {
});
const result = render(<ContainerEnvironment container={container} namespace={pod.getNs()} />);
expect(result.getByTestId("env-foobar")).toHaveTextContent(`foobar= https://localhost:12345`);
expect(result.getByTestId("envFrom-configmap-my-config-map:configFoo")).toHaveTextContent(`configFoo= configBar`);
expect(result.getByTestId("env-foobar")).toHaveTextContent(`foobar = https://localhost:12345`);
expect(result.getByTestId("envFrom-configmap-my-config-map:configFoo")).toHaveTextContent(`configFoo = configBar`);
});
});