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:
parent
343ef9a21c
commit
963114a933
@ -57,7 +57,7 @@ const NonInjectedContainerEnvFromSource = ({
|
|||||||
data-testid={`envFrom-${kind}-${testIdName}`}
|
data-testid={`envFrom-${kind}-${testIdName}`}
|
||||||
>
|
>
|
||||||
<span className="var-name">{fieldName}</span>
|
<span className="var-name">{fieldName}</span>
|
||||||
{`= `}
|
{` = `}
|
||||||
{value}
|
{value}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -91,7 +91,7 @@ describe("<ContainerEnv />", () => {
|
|||||||
});
|
});
|
||||||
const result = render(<ContainerEnvironment container={container} namespace={pod.getNs()} />);
|
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", () => {
|
it("renders envFrom when given a configMapRef", () => {
|
||||||
@ -140,7 +140,7 @@ describe("<ContainerEnv />", () => {
|
|||||||
});
|
});
|
||||||
const result = render(<ContainerEnvironment container={container} namespace={pod.getNs()} />);
|
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", () => {
|
it("renders envFrom when given a secretRef", () => {
|
||||||
@ -190,7 +190,7 @@ describe("<ContainerEnv />", () => {
|
|||||||
});
|
});
|
||||||
const result = render(<ContainerEnvironment container={container} namespace={pod.getNs()} />);
|
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", () => {
|
it("renders env", () => {
|
||||||
@ -218,7 +218,7 @@ describe("<ContainerEnv />", () => {
|
|||||||
});
|
});
|
||||||
const result = render(<ContainerEnvironment container={container} namespace={pod.getNs()} />);
|
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", () => {
|
it("renders both env and configMapRef envFrom", () => {
|
||||||
@ -271,7 +271,7 @@ describe("<ContainerEnv />", () => {
|
|||||||
});
|
});
|
||||||
const result = render(<ContainerEnvironment container={container} namespace={pod.getNs()} />);
|
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`);
|
||||||
expect(result.getByTestId("envFrom-configmap-my-config-map:configFoo")).toHaveTextContent(`configFoo= configBar`);
|
expect(result.getByTestId("envFrom-configmap-my-config-map:configFoo")).toHaveTextContent(`configFoo = configBar`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user