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 #84

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

wip #84

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
33 changes: 17 additions & 16 deletions main.w
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
bring cloud;
bring util;
bring expect;

let bucket = new cloud.Bucket() as "Pol's Bucket";
let queue = new cloud.Queue() as "Pol's Queue";
let topic = new cloud.Topic() as "Pol's Topic";
let counter = new cloud.Counter() as "Pol's Counter";
let api = new cloud.Api() as "Pol's API";
let website = new cloud.Website(path: "") as "Pol's Website";
let bucket = new cloud.Bucket();
let queue = new cloud.Queue();

api.get("/hello", inflight (request) => {
return {
status: 200,
body: "Hello World"
};
});
queue.setConsumer(inflight (message) => {
bucket.put("wing.txt", "Hello, {message}");
}, timeout: 30s);

test "Assert true" {
log("Assertion should pass");
assert(true);
}
test "Hello, world!" {
queue.push("world!");

let found = util.waitUntil(() => {
log("Checking if wing.txt exists");
return bucket.exists("wing.txt");
});

expect.equal(bucket.get("wing.txt"), "Hello, world!");
}