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

WIP: testing #315

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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: 1 addition & 11 deletions k8s/api-object.w
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
bring "cdk8s" as cdk8s;

pub struct ApiObjectProps extends cdk8s.ApiObjectProps {
spec: Json?;
}

pub class ApiObject extends cdk8s.ApiObject {
new(props: ApiObjectProps) {
super(props);
}
}
pub class ApiObject {}
1 change: 0 additions & 1 deletion k8s/bin/kwing

This file was deleted.

14 changes: 0 additions & 14 deletions k8s/examples/api-object.main.w

This file was deleted.

11 changes: 0 additions & 11 deletions k8s/examples/api-object.main.w.snap

This file was deleted.

1 change: 0 additions & 1 deletion k8s/examples/nodejs-app/index.js

This file was deleted.

29 changes: 0 additions & 29 deletions k8s/examples/nodejs.main.w

This file was deleted.

85 changes: 0 additions & 85 deletions k8s/examples/nodejs.main.w.snap

This file was deleted.

4 changes: 0 additions & 4 deletions k8s/examples/ubuntu.main.w

This file was deleted.

46 changes: 0 additions & 46 deletions k8s/examples/ubuntu.main.w.snap

This file was deleted.

1 change: 1 addition & 0 deletions k8s/lib/blah.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yo
38 changes: 0 additions & 38 deletions k8s/lib/index.js

This file was deleted.

6 changes: 0 additions & 6 deletions k8s/root.test.w

This file was deleted.

34 changes: 1 addition & 33 deletions k8s/test.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,2 @@
#!/bin/sh
t() {
echo "$1 ================"
out=$(wing compile -t ./lib/index.js $1)

cat $out/*.yaml > $1.actual.snap
cat $1.actual.snap

if [ -f "$1.snap" ]; then
diff $1.snap $1.actual.snap
if [ $? -eq 0 ]; then
echo "$1: passed"
else
echo "$1: failed, updating snapshot"
cp $1.actual.snap $1.snap
rm $1.actual.snap
exit 1
fi
else
cp $1.actual.snap $1.snap
fi

rm $1.actual.snap
}

t examples/nodejs.main.w
t examples/ubuntu.main.w

WING_K8S_LABELS='{"app":"bang-bang", "fang": "fang"}' \
WING_K8S_NAMESPACE=flanging \
t examples/api-object.main.w

echo "compiling all test files..."
wing compile -t ./lib/index.js *.test.w
echo "Done"
Loading