upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/grasp-audit/src/specs/grasp01/repository_creation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'grasp-audit/src/specs/grasp01/repository_creation.rs')
-rw-r--r--grasp-audit/src/specs/grasp01/repository_creation.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/grasp-audit/src/specs/grasp01/repository_creation.rs b/grasp-audit/src/specs/grasp01/repository_creation.rs
index a99b0d2..2eddb97 100644
--- a/grasp-audit/src/specs/grasp01/repository_creation.rs
+++ b/grasp-audit/src/specs/grasp01/repository_creation.rs
@@ -55,7 +55,7 @@ impl RepositoryCreationTests {
55 Err(e) => { 55 Err(e) => {
56 return TestResult::new( 56 return TestResult::new(
57 test_name, 57 test_name,
58 "GRASP-01:git-http:28", 58 "GRASP-01:git-http:34",
59 "Bare repository must be created and accessible via Smart HTTP when announcement is accepted", 59 "Bare repository must be created and accessible via Smart HTTP when announcement is accepted",
60 ) 60 )
61 .fail(format!("Failed to create repo fixture: {}", e)) 61 .fail(format!("Failed to create repo fixture: {}", e))
@@ -76,7 +76,7 @@ impl RepositoryCreationTests {
76 None => { 76 None => {
77 return TestResult::new( 77 return TestResult::new(
78 test_name, 78 test_name,
79 "GRASP-01:git-http:28", 79 "GRASP-01:git-http:34",
80 "Bare repository must be created and accessible via Smart HTTP when announcement is accepted", 80 "Bare repository must be created and accessible via Smart HTTP when announcement is accepted",
81 ) 81 )
82 .fail("Repository announcement missing d tag") 82 .fail("Repository announcement missing d tag")
@@ -88,7 +88,7 @@ impl RepositoryCreationTests {
88 Err(e) => { 88 Err(e) => {
89 return TestResult::new( 89 return TestResult::new(
90 test_name, 90 test_name,
91 "GRASP-01:git-http:28", 91 "GRASP-01:git-http:34",
92 "Bare repository must be created and accessible via Smart HTTP when announcement is accepted", 92 "Bare repository must be created and accessible via Smart HTTP when announcement is accepted",
93 ) 93 )
94 .fail(format!("Failed to convert pubkey to npub: {}", e)) 94 .fail(format!("Failed to convert pubkey to npub: {}", e))
@@ -99,7 +99,7 @@ impl RepositoryCreationTests {
99 if let Err(e) = check_repo_accessible_via_http(relay_domain, &npub, &repo_id).await { 99 if let Err(e) = check_repo_accessible_via_http(relay_domain, &npub, &repo_id).await {
100 return TestResult::new( 100 return TestResult::new(
101 test_name, 101 test_name,
102 "GRASP-01:git-http:28", 102 "GRASP-01:git-http:34",
103 "Bare repository must be created and accessible via Smart HTTP when announcement is accepted", 103 "Bare repository must be created and accessible via Smart HTTP when announcement is accepted",
104 ) 104 )
105 .fail(format!("Repository not accessible via HTTP: {}", e)); 105 .fail(format!("Repository not accessible via HTTP: {}", e));
@@ -107,7 +107,7 @@ impl RepositoryCreationTests {
107 107
108 TestResult::new( 108 TestResult::new(
109 test_name, 109 test_name,
110 "GRASP-01:git-http:28", 110 "GRASP-01:git-http:34",
111 "Bare repository must be created and accessible via Smart HTTP when announcement is accepted", 111 "Bare repository must be created and accessible via Smart HTTP when announcement is accepted",
112 ) 112 )
113 .pass() 113 .pass()
@@ -135,7 +135,7 @@ impl RepositoryCreationTests {
135 Err(e) => { 135 Err(e) => {
136 return TestResult::new( 136 return TestResult::new(
137 test_name, 137 test_name,
138 "GRASP-01:git-http:38", 138 "GRASP-01:git-http:44",
139 "Relay SHOULD serve a webpage for existing repositories", 139 "Relay SHOULD serve a webpage for existing repositories",
140 ) 140 )
141 .fail(format!("Failed to create repo fixture: {}", e)) 141 .fail(format!("Failed to create repo fixture: {}", e))
@@ -156,7 +156,7 @@ impl RepositoryCreationTests {
156 None => { 156 None => {
157 return TestResult::new( 157 return TestResult::new(
158 test_name, 158 test_name,
159 "GRASP-01:git-http:38", 159 "GRASP-01:git-http:44",
160 "Relay SHOULD serve a webpage for existing repositories", 160 "Relay SHOULD serve a webpage for existing repositories",
161 ) 161 )
162 .fail("Repository announcement missing d tag") 162 .fail("Repository announcement missing d tag")
@@ -168,7 +168,7 @@ impl RepositoryCreationTests {
168 Err(e) => { 168 Err(e) => {
169 return TestResult::new( 169 return TestResult::new(
170 test_name, 170 test_name,
171 "GRASP-01:git-http:38", 171 "GRASP-01:git-http:44",
172 "Relay SHOULD serve a webpage for existing repositories", 172 "Relay SHOULD serve a webpage for existing repositories",
173 ) 173 )
174 .fail(format!("Failed to convert pubkey to npub: {}", e)) 174 .fail(format!("Failed to convert pubkey to npub: {}", e))
@@ -179,7 +179,7 @@ impl RepositoryCreationTests {
179 if let Err(e) = check_webpage_served(relay_domain, &npub, &repo_id).await { 179 if let Err(e) = check_webpage_served(relay_domain, &npub, &repo_id).await {
180 return TestResult::new( 180 return TestResult::new(
181 test_name, 181 test_name,
182 "GRASP-01:git-http:38", 182 "GRASP-01:git-http:44",
183 "Relay SHOULD serve a webpage for existing repositories", 183 "Relay SHOULD serve a webpage for existing repositories",
184 ) 184 )
185 .fail(format!("Webpage not served: {}", e)); 185 .fail(format!("Webpage not served: {}", e));
@@ -187,7 +187,7 @@ impl RepositoryCreationTests {
187 187
188 TestResult::new( 188 TestResult::new(
189 test_name, 189 test_name,
190 "GRASP-01:git-http:38", 190 "GRASP-01:git-http:44",
191 "Relay SHOULD serve a webpage for existing repositories", 191 "Relay SHOULD serve a webpage for existing repositories",
192 ) 192 )
193 .pass() 193 .pass()
@@ -214,7 +214,7 @@ impl RepositoryCreationTests {
214 Err(e) => { 214 Err(e) => {
215 return TestResult::new( 215 return TestResult::new(
216 test_name, 216 test_name,
217 "GRASP-01:git-http:38", 217 "GRASP-01:git-http:44",
218 "Relay SHOULD return 404 for repositories it doesn't host", 218 "Relay SHOULD return 404 for repositories it doesn't host",
219 ) 219 )
220 .fail(format!("Failed to create repo fixture: {}", e)) 220 .fail(format!("Failed to create repo fixture: {}", e))
@@ -226,7 +226,7 @@ impl RepositoryCreationTests {
226 Err(e) => { 226 Err(e) => {
227 return TestResult::new( 227 return TestResult::new(
228 test_name, 228 test_name,
229 "GRASP-01:git-http:38", 229 "GRASP-01:git-http:44",
230 "Relay SHOULD return 404 for repositories it doesn't host", 230 "Relay SHOULD return 404 for repositories it doesn't host",
231 ) 231 )
232 .fail(format!("Failed to convert pubkey to npub: {}", e)) 232 .fail(format!("Failed to convert pubkey to npub: {}", e))
@@ -239,7 +239,7 @@ impl RepositoryCreationTests {
239 if let Err(e) = check_404_for_nonexistent_repo(relay_domain, &npub, fake_repo_id).await { 239 if let Err(e) = check_404_for_nonexistent_repo(relay_domain, &npub, fake_repo_id).await {
240 return TestResult::new( 240 return TestResult::new(
241 test_name, 241 test_name,
242 "GRASP-01:git-http:38", 242 "GRASP-01:git-http:44",
243 "Relay SHOULD return 404 for repositories it doesn't host", 243 "Relay SHOULD return 404 for repositories it doesn't host",
244 ) 244 )
245 .fail(format!("Expected 404, got: {}", e)); 245 .fail(format!("Expected 404, got: {}", e));
@@ -247,7 +247,7 @@ impl RepositoryCreationTests {
247 247
248 TestResult::new( 248 TestResult::new(
249 test_name, 249 test_name,
250 "GRASP-01:git-http:38", 250 "GRASP-01:git-http:44",
251 "Relay SHOULD return 404 for repositories it doesn't host", 251 "Relay SHOULD return 404 for repositories it doesn't host",
252 ) 252 )
253 .pass() 253 .pass()