Skip to content

Commit

Permalink
Snapshott
Browse files Browse the repository at this point in the history
  • Loading branch information
joyliu-q committed Oct 22, 2023
1 parent 01a5da1 commit e276cef
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
76 changes: 76 additions & 0 deletions cdk/kittyhawk/test/__snapshots__/deployment.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions cdk/kittyhawk/test/deployment.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Construct } from "constructs";
import { Container, Deployment } from "../src";
import { chartTest, failingTestNoGitSha } from "./utils";
import { KubeServiceAccount } from "../src/imports/k8s";

export function buildDeploymentDefault(scope: Construct) {
new Deployment(scope, "container", {
Expand All @@ -9,6 +10,18 @@ export function buildDeploymentDefault(scope: Construct) {
});
}

export function buildDeploymentWithServiceAccount(scope: Construct) {
new Deployment(scope, "container", {
image: "pennlabs/website",
tag: "latest",
serviceAccount: new KubeServiceAccount(scope, "service-account", {
metadata: {
name: "service-account",
},
}),
});
}

export function buildContainerDefault() {
new Container({
image: "pennlabs/website",
Expand All @@ -18,4 +31,7 @@ export function buildContainerDefault() {

test("Deployment -- No Git Sha", () =>
failingTestNoGitSha(buildDeploymentDefault));
test("Deployment -- With Service Account", () =>
chartTest(buildDeploymentWithServiceAccount));
test("Deployment -- Default", () => chartTest(buildDeploymentDefault));
test("Container -- Default", () => chartTest(buildContainerDefault));

0 comments on commit e276cef

Please sign in to comment.