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

Add a ruletype that checks the issue tracker status #254

Closed
wants to merge 2 commits into from
Closed
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
56 changes: 56 additions & 0 deletions rule-types/github/repo_issues.test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
tests:
- name: "Issues are enabled"
def:
has_issues: true
params: {}
expect: "pass"
entity: &test-repo
type: repository
entity:
owner: "coolhead"
name: "haze-wave"
http:
body_file: enabled.json
- name: "Issues are disabled"
def:
has_issues: false
params: {}
expect: "pass"
entity: *test-repo
http:
body_file: disabled.json
- name: "Issues should be enabled"
def:
has_issues: true
params: {}
expect: "fail"
entity: *test-repo
http:
body_file: disabled.json
- name: "Issues should be disabled"
def:
has_issues: false
params: { }
expect: "fail"
entity: *test-repo
http:
body_file: enabled.json
- name: "Not found should fail"
def:
has_issues: true
params: {}
expect: "fail"
entity: *test-repo
http:
status: 404
body_file: notfound.json
- name: "Internal server error should fail"
def:
has_issues: true
params: {}
expect: "fail"
entity: *test-repo
http:
status: 500
body: |
{ "message": "Internal server error" }
Loading
Loading