Skip to content

Commit 7656101

Browse files
committed
docs: Translate Korean comments to English in test files
1 parent 2e2178f commit 7656101

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

tests/file_manager/handlers.rs

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,10 @@ async fn upload_file_success() {
9999
async fn upload_file_handles_duplicate_filename() {
100100
let setup = setup_test(b"print('Hello, World!')", "duplicate-test.py").await;
101101

102-
// 첫 번째 파일 업로드 (성공)
103102
let response1 = upload_file_request(&setup).await;
104103
assert_eq!(response1.status(), reqwest::StatusCode::CREATED);
105104

106-
// 두 번째 파일 업로드 (같은 파일명, 실패해야 함)
107105
let response2 = upload_file_request(&setup).await;
108-
109-
// 중복 파일 에러 확인
110106
assert_eq!(response2.status(), reqwest::StatusCode::CONFLICT);
111107

112108
let error_response = response2.json::<serde_json::Value>().await.unwrap();
@@ -116,7 +112,6 @@ async fn upload_file_handles_duplicate_filename() {
116112
.unwrap()
117113
.contains("already exists"));
118114

119-
// 파일이 실제로 하나만 존재하는지 확인
120115
let expected_file_path = format!(
121116
"{}/{}/solution/{}",
122117
setup.temp_dir.path().to_str().unwrap(),
@@ -135,11 +130,10 @@ async fn get_file_success() {
135130
)
136131
.await;
137132

138-
// 먼저 파일 업로드
139133
let upload_response = upload_file_request(&setup).await;
140134
assert_eq!(upload_response.status(), reqwest::StatusCode::CREATED);
141135

142-
// 파일 내용 조회
136+
// Retrieve file content
143137
let client = reqwest::Client::new();
144138
let response = client
145139
.get(&format!(
@@ -154,7 +148,6 @@ async fn get_file_success() {
154148

155149
assert_eq!(response.status(), reqwest::StatusCode::OK);
156150

157-
// Content-Type 확인
158151
let content_type = response
159152
.headers()
160153
.get("content-type")
@@ -163,7 +156,6 @@ async fn get_file_success() {
163156
.unwrap();
164157
assert_eq!(content_type, "text/html; charset=UTF-8");
165158

166-
// 파일 내용 확인
167159
let file_content = response.text().await.unwrap();
168160
assert_eq!(
169161
file_content,
@@ -176,11 +168,10 @@ async fn get_file_success() {
176168
async fn get_files_by_category_success() {
177169
let setup = setup_test(b"print('Hello, World!')", "hello.py").await;
178170

179-
// 파일 업로드
180171
let upload_response = upload_file_request(&setup).await;
181172
assert_eq!(upload_response.status(), reqwest::StatusCode::CREATED);
182173

183-
// 카테고리별 파일 목록 조회
174+
// Retrieve file list by category
184175
let client = reqwest::Client::new();
185176
let response = client
186177
.get(&format!(
@@ -205,11 +196,10 @@ async fn get_files_by_category_success() {
205196
async fn delete_file_success() {
206197
let setup = setup_test(b"print('Hello, World!')", "delete-test.py").await;
207198

208-
// 먼저 파일 업로드
209199
let upload_response = upload_file_request(&setup).await;
210200
assert_eq!(upload_response.status(), reqwest::StatusCode::CREATED);
211201

212-
// 파일이 존재하는지 확인
202+
// Check if file exists
213203
let expected_file_path = format!(
214204
"{}/{}/solution/{}",
215205
setup.temp_dir.path().to_str().unwrap(),
@@ -218,7 +208,7 @@ async fn delete_file_success() {
218208
);
219209
assert!(Path::new(&expected_file_path).exists());
220210

221-
// 파일 삭제
211+
// Delete file
222212
let client = reqwest::Client::new();
223213
let response = client
224214
.delete(&format!(
@@ -240,7 +230,6 @@ async fn delete_file_success() {
240230
.unwrap()
241231
.contains("deleted successfully"));
242232

243-
// 파일이 실제로 삭제되었는지 확인
244233
assert!(!Path::new(&expected_file_path).exists());
245234
}
246235

@@ -249,7 +238,7 @@ async fn delete_file_success() {
249238
async fn delete_file_not_found() {
250239
let setup = setup_test(b"print('Hello, World!')", "not-found-test.py").await;
251240

252-
// 파일을 업로드하지 않고 바로 삭제 시도
241+
// Attempt to delete without uploading file first
253242
let client = reqwest::Client::new();
254243
let response = client
255244
.delete(&format!(
@@ -277,11 +266,10 @@ async fn delete_file_not_found() {
277266
async fn update_file_content_success() {
278267
let setup = setup_test(b"print(int(input()) - int(input()))", "update-test.py").await;
279268

280-
// 먼저 파일 업로드
281269
let upload_response = upload_file_request(&setup).await;
282270
assert_eq!(upload_response.status(), reqwest::StatusCode::CREATED);
283271

284-
// 파일 수정
272+
// Modify file
285273
let client = reqwest::Client::new();
286274
let update_data = serde_json::json!({
287275
"content": "print(int(input()) + int(input()))"
@@ -308,7 +296,7 @@ async fn update_file_content_success() {
308296
.unwrap()
309297
.contains("updated successfully"));
310298

311-
// 파일 내용이 실제로 업데이트되었는지 확인
299+
// Verify that file content was actually updated
312300
let expected_file_path = format!(
313301
"{}/{}/solution/{}",
314302
setup.temp_dir.path().to_str().unwrap(),
@@ -328,7 +316,7 @@ async fn update_file_not_found() {
328316
)
329317
.await;
330318

331-
// 파일을 업로드하지 않고 바로 수정 시도
319+
// Attempt to modify without uploading file first
332320
let client = reqwest::Client::new();
333321
let update_data = serde_json::json!({
334322
"content": "print('Updated content!')"
@@ -361,11 +349,10 @@ async fn update_file_not_found() {
361349
async fn update_file_missing_content() {
362350
let setup = setup_test(b"print('Hello, World!')", "missing-content-test.py").await;
363351

364-
// 파일 업로드
365352
let upload_response = upload_file_request(&setup).await;
366353
assert_eq!(upload_response.status(), reqwest::StatusCode::CREATED);
367354

368-
// content 필드 없이 수정 시도
355+
// Attempt to modify without content field
369356
let client = reqwest::Client::new();
370357
let update_data = serde_json::json!({
371358
"other_field": "some value"
@@ -391,11 +378,10 @@ async fn update_file_missing_content() {
391378
async fn update_filename_success() {
392379
let setup = setup_test(b"print(int(input()) + int(input()))", "aplusb.py").await;
393380

394-
// 먼저 파일 업로드
395381
let upload_response = upload_file_request(&setup).await;
396382
assert_eq!(upload_response.status(), reqwest::StatusCode::CREATED);
397383

398-
// 파일 수정
384+
// Modify file
399385
let client = reqwest::Client::new();
400386
let new_filename = "aplusb-AC.py";
401387
let update_data = serde_json::json!({
@@ -423,7 +409,7 @@ async fn update_filename_success() {
423409
.unwrap()
424410
.contains("updated successfully"));
425411

426-
// 파일 이름이 실제로 업데이트되었는지 확인
412+
// Verify that filename was actually updated
427413
let expected_file_path = format!(
428414
"{}/{}/solution/{}",
429415
setup.temp_dir.path().to_str().unwrap(),

0 commit comments

Comments
 (0)