Skip to content

Commit

Permalink
Merge of #138
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Mar 26, 2024
2 parents b064dfa + d194fa3 commit 7fe9e38
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions checks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ let allResults = resultsBucket.list();
- [ ] REST API for querying/executing checks
- [ ] Console UI

## Maintainers
- [Elad Ben-Israel](https://github.com/eladb)
- [Subhodip Roy](https://github.com/subh-cs)

## License

Licensed under the [MIT License](./LICENSE).
7 changes: 6 additions & 1 deletion checks/check.test.w
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ bring http;
bring cloud;
bring expect;

let checkName = "Test";
let api = new cloud.Api();
let s = new cloud.Bucket() as "customize";
let responseKey = "response.json";
Expand All @@ -27,7 +28,7 @@ let check = new c.Check(inflight () => {

log(response.body);
expect.equal(response.body, "/foo"); // body is expected to be the path
}, deploy: false);
}, deploy: false) as checkName;

test "run() with success" {
let result = check.run();
Expand Down Expand Up @@ -55,4 +56,8 @@ test "run() with failure" {
assert(!result.ok);
expect.equal(result.error, "response status 404");
expect.equal(check.latest()?.ok, false);
}

test "check name is set" {
expect.equal("check {check.node.id}", "check {checkName}");
}
2 changes: 1 addition & 1 deletion checks/check.w
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub class Check impl ICheck {
}

if props?.testing ?? true {
new std.Test(handler) as "test";
new std.Test(handler) as "check {this.node.id}";
}

this.invoker = new cloud.Function(wrapper) as "run";
Expand Down

0 comments on commit 7fe9e38

Please sign in to comment.