Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(containers): helm output #223

Merged
merged 13 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/containers-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@ jobs:
run: npm install --include=dev
working-directory: containers
- name: Test
run: wing test
run: |
#!/bin/sh
if [ -n "$CI" ]; then
snapshot_mode="assert"
else
snapshot_mode="update"
fi

DEBUG=1 wing test
wing test -t tf-aws -s $snapshot_mode containers.test.w
wing test -t tf-aws -s $snapshot_mode containers-with-readiness.test.w
working-directory: containers
- name: Pack
run: wing pack
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/containers-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ jobs:
run: npm install --include=dev
working-directory: containers
- name: Test
run: wing test
run: |
#!/bin/sh
if [ -n "$CI" ]; then
snapshot_mode="assert"
else
snapshot_mode="update"
fi

DEBUG=1 wing test
wing test -t tf-aws -s $snapshot_mode containers.test.w
wing test -t tf-aws -s $snapshot_mode containers-with-readiness.test.w
working-directory: containers
- name: Pack
run: wing pack
Expand Down
32 changes: 32 additions & 0 deletions containers/containers-with-readiness.test.w
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
bring "./workload.w" as containers;
bring expect;
bring http;

let message = "hello, wing change!!";

let hello = new containers.Workload(
name: "hello",
image: "paulbouwer/hello-kubernetes:1",
port: 8080,
readiness: "/",
replicas: 2,
env: {
"MESSAGE" => message,
},
public: true,
) as "hello";


let httpGet = inflight (url: str?): str => {
if let url = url {
return http.get(url).body;
}

throw "no body";
};

test "access public url" {
let helloBody = httpGet(hello.publicUrl);
log(helloBody);
assert(helloBody.contains(message));
}
Loading
Loading