Skip to content

Commit 4484e16

Browse files
authored
Adding rule type for OSPS-QA-01 (#248)
1 parent c09f5f3 commit 4484e16

File tree

5 files changed

+835
-0
lines changed

5 files changed

+835
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
tests:
2+
- name: "Should be public"
3+
def:
4+
visibility: "public"
5+
params: {}
6+
expect: "pass"
7+
entity: &test-repo
8+
type: repository
9+
entity:
10+
owner: "coolhead"
11+
name: "haze-wave"
12+
http:
13+
body_file: public.json
14+
- name: "Should be private"
15+
def:
16+
visibility: "private"
17+
params: {}
18+
expect: "pass"
19+
entity: *test-repo
20+
http:
21+
body_file: private.json
22+
- name: "Should be public"
23+
def:
24+
visibility: "public"
25+
params: {}
26+
expect: "fail"
27+
entity: *test-repo
28+
http:
29+
body_file: private.json
30+
- name: "Not found should fail"
31+
def:
32+
visibility: "public"
33+
params: {}
34+
expect: "fail"
35+
entity: *test-repo
36+
http:
37+
status: 404
38+
body_file: notfound.json
39+
- name: "Internal server error should fail"
40+
def: {}
41+
params: {}
42+
expect: "fail"
43+
entity: *test-repo
44+
http:
45+
status: 500
46+
body: |
47+
{ "message": "Internal server error" }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"message": "Not Found",
3+
"documentation_url": "https://docs.github.com/rest/repos/repos#get-a-repository",
4+
"status": "404"
5+
}

0 commit comments

Comments
 (0)