Переглянути джерело

Merge branch 'fix/报告容器改为report' of jyx/dcjxb.microservice into master

金逸霄 2 тижнів тому
батько
коміт
b703a5acf6

+ 9 - 9
abilities/exam-sprint/infrastructure/src/test/java/cn/yunzhixue/ability/center/examsprint/infrastructure/report/storage/AzureBlobExamSprintReportStorageTest.java

@@ -51,7 +51,7 @@ class AzureBlobExamSprintReportStorageTest {
         BlobContainerClient containerClient = mock(BlobContainerClient.class);
         AzureBlobExamSprintReportStorage storage = new AzureBlobExamSprintReportStorage(
                 containerClient,
-                "exam-assault-report",
+                "report",
                 "https://dcjxbtest.blob.core.chinacloudapi.cn",
                 FIXED_CLOCK);
 
@@ -60,7 +60,7 @@ class AzureBlobExamSprintReportStorageTest {
                 Duration.ofMinutes(15));
 
         assertThat(downloadUrl).isEqualTo(URI.create(
-                "https://dcjxbtest.blob.core.chinacloudapi.cn/exam-assault-report/exam-sprint-outlook-report-report-123.pdf"));
+                "https://dcjxbtest.blob.core.chinacloudapi.cn/report/exam-sprint-outlook-report-report-123.pdf"));
         verifyNoInteractions(containerClient);
     }
 
@@ -69,7 +69,7 @@ class AzureBlobExamSprintReportStorageTest {
         BlobContainerClient containerClient = mock(BlobContainerClient.class);
         AzureBlobExamSprintReportStorage storage = new AzureBlobExamSprintReportStorage(
                 containerClient,
-                "/exam-assault-report/",
+                "/report/",
                 "https://dcjxbtest.blob.core.chinacloudapi.cn/",
                 FIXED_CLOCK);
 
@@ -78,7 +78,7 @@ class AzureBlobExamSprintReportStorageTest {
                 Duration.ofMinutes(15));
 
         assertThat(downloadUrl).isEqualTo(URI.create(
-                "https://dcjxbtest.blob.core.chinacloudapi.cn/exam-assault-report/file.pdf"));
+                "https://dcjxbtest.blob.core.chinacloudapi.cn/report/file.pdf"));
     }
 
     @Test
@@ -86,7 +86,7 @@ class AzureBlobExamSprintReportStorageTest {
         BlobContainerClient containerClient = mock(BlobContainerClient.class);
         AzureBlobExamSprintReportStorage storage = new AzureBlobExamSprintReportStorage(
                 containerClient,
-                "exam-assault-report",
+                "report",
                 "https://dcjxbtest.blob.core.chinacloudapi.cn",
                 FIXED_CLOCK);
 
@@ -100,7 +100,7 @@ class AzureBlobExamSprintReportStorageTest {
         BlobContainerClient containerClient = mock(BlobContainerClient.class);
         AzureBlobExamSprintReportStorage storage = new AzureBlobExamSprintReportStorage(
                 containerClient,
-                "exam-assault-report",
+                "report",
                 "https://dcjxbtest.blob.core.chinacloudapi.cn",
                 FIXED_CLOCK);
 
@@ -115,7 +115,7 @@ class AzureBlobExamSprintReportStorageTest {
 
         assertThatThrownBy(() -> new AzureBlobExamSprintReportStorage(
                 containerClient,
-                "exam-assault-report",
+                "report",
                 "///",
                 FIXED_CLOCK))
                 .isInstanceOf(IllegalStateException.class)
@@ -128,7 +128,7 @@ class AzureBlobExamSprintReportStorageTest {
 
         assertThatThrownBy(() -> new AzureBlobExamSprintReportStorage(
                 containerClient,
-                "exam-assault-report",
+                "report",
                 " / ",
                 FIXED_CLOCK))
                 .isInstanceOf(IllegalStateException.class)
@@ -142,7 +142,7 @@ class AzureBlobExamSprintReportStorageTest {
         when(containerClient.getBlobClient("file.pdf")).thenReturn(blobClient);
         AzureBlobExamSprintReportStorage storage = new AzureBlobExamSprintReportStorage(
                 containerClient,
-                "exam-assault-report",
+                "report",
                 "https://dcjxbtest.blob.core.chinacloudapi.cn",
                 FIXED_CLOCK);
 

+ 1 - 1
ability-center-runtime/src/main/resources/application-prod.yml

@@ -4,5 +4,5 @@ ability:
       storage:
         type: azure
         connection-string: "${AZURE_BLOB_CONNECTION_STRING:DefaultEndpointsProtocol=https;AccountName=dcjxb;AccountKey=+Bg9srieVxwemxcE2b+icL3t3hp8m04PuYanTl6fwB/Cx1SF49qimBpYvXQjcvatgDDDgxjqYDP/0DCFTSQcgg==;EndpointSuffix=core.chinacloudapi.cn;}"
-        container-name: "${AZURE_BLOB_CONTAINER:exam-assault-report}"
+        container-name: "${AZURE_BLOB_CONTAINER:report}"
         download-url-prefix: "${AZURE_BLOB_DOWNLOAD_URL_PREFIX:https://dcjxb.blob.core.chinacloudapi.cn}"

+ 1 - 1
ability-center-runtime/src/main/resources/application-test.yml

@@ -7,5 +7,5 @@ ability:
       storage:
         type: azure
         connection-string: "DefaultEndpointsProtocol=https;AccountName=dcjxbtest;AccountKey=CoOzFKq3/aecqY8JehnW+oV3XYe8dN8772NQbhT5VzYO5fdrx+Ps/LhmPqv9U/M28BtqSrgN13pjJqPvIRdI2w==;EndpointSuffix=core.chinacloudapi.cn"
-        container-name: "${AZURE_BLOB_CONTAINER:exam-assault-report}"
+        container-name: "${AZURE_BLOB_CONTAINER:report}"
         download-url-prefix: "${AZURE_BLOB_DOWNLOAD_URL_PREFIX:https://dcjxbtest.blob.core.chinacloudapi.cn}"

+ 6 - 6
ability-center-runtime/src/test/java/cn/yunzhixue/ability/center/examsprint/adapter/http/ExamSprintReportControllerWebMvcTest.java

@@ -116,7 +116,7 @@ class ExamSprintReportControllerWebMvcTest {
                 Instant.parse("2026-01-01T00:00:00Z"),
                 Instant.parse("2026-01-01T00:01:00Z"),
                 Instant.parse("2026-01-02T00:00:00Z"),
-                "https://dcjxbtest.blob.core.chinacloudapi.cn/exam-assault-report/exam-sprint-outlook-report-report-sync-001.pdf"));
+                "https://dcjxbtest.blob.core.chinacloudapi.cn/report/exam-sprint-outlook-report-report-sync-001.pdf"));
 
         String requestJson = requestPayloadJson("requests/exam-sprint-outlook-report-request.json");
 
@@ -126,7 +126,7 @@ class ExamSprintReportControllerWebMvcTest {
                 .andExpect(status().isOk())
                 .andExpect(jsonPath("$.data.reportType").value("OUTLOOK"))
                 .andExpect(jsonPath("$.data.generationStatus").value("SUCCESS"))
-                .andExpect(jsonPath("$.data.downloadUrl").value("https://dcjxbtest.blob.core.chinacloudapi.cn/exam-assault-report/exam-sprint-outlook-report-report-sync-001.pdf"));
+                .andExpect(jsonPath("$.data.downloadUrl").value("https://dcjxbtest.blob.core.chinacloudapi.cn/report/exam-sprint-outlook-report-report-sync-001.pdf"));
 
         verify(applicationService).createOutlookReportSync(any());
     }
@@ -140,7 +140,7 @@ class ExamSprintReportControllerWebMvcTest {
                 Instant.parse("2026-01-01T00:00:00Z"),
                 Instant.parse("2026-01-01T00:01:00Z"),
                 Instant.parse("2026-01-02T00:00:00Z"),
-                "https://dcjxbtest.blob.core.chinacloudapi.cn/exam-assault-report/exam-sprint-achievement-report-report-sync-002.pdf"));
+                "https://dcjxbtest.blob.core.chinacloudapi.cn/report/exam-sprint-achievement-report-report-sync-002.pdf"));
 
         String requestJson = requestPayloadJson("requests/exam-sprint-achievement-report-request.json");
 
@@ -150,7 +150,7 @@ class ExamSprintReportControllerWebMvcTest {
                 .andExpect(status().isOk())
                 .andExpect(jsonPath("$.data.reportType").value("ACHIEVEMENT"))
                 .andExpect(jsonPath("$.data.generationStatus").value("SUCCESS"))
-                .andExpect(jsonPath("$.data.downloadUrl").value("https://dcjxbtest.blob.core.chinacloudapi.cn/exam-assault-report/exam-sprint-achievement-report-report-sync-002.pdf"));
+                .andExpect(jsonPath("$.data.downloadUrl").value("https://dcjxbtest.blob.core.chinacloudapi.cn/report/exam-sprint-achievement-report-report-sync-002.pdf"));
 
         verify(applicationService).createAchievementReportSync(any());
     }
@@ -188,7 +188,7 @@ class ExamSprintReportControllerWebMvcTest {
                 Instant.parse("2026-01-01T00:00:00Z"),
                 Instant.parse("2026-01-01T00:05:00Z"),
                 Instant.parse("2026-01-02T00:00:00Z"),
-                "https://dcjxbtest.blob.core.chinacloudapi.cn/exam-assault-report/exam-sprint-outlook-report-report-001.pdf",
+                "https://dcjxbtest.blob.core.chinacloudapi.cn/report/exam-sprint-outlook-report-report-001.pdf",
                 null));
         given(applicationService.downloadReport("report-001")).willReturn(new ReportDownloadContent(
                 "exam-sprint-outlook-report-report-001.pdf",
@@ -198,7 +198,7 @@ class ExamSprintReportControllerWebMvcTest {
         mockMvc.perform(get("/api/exam-sprint/reports/{reportId}", "report-001"))
                 .andExpect(status().isOk())
                 .andExpect(jsonPath("$.data.reportId").value("report-001"))
-                .andExpect(jsonPath("$.data.downloadUrl").value("https://dcjxbtest.blob.core.chinacloudapi.cn/exam-assault-report/exam-sprint-outlook-report-report-001.pdf"));
+                .andExpect(jsonPath("$.data.downloadUrl").value("https://dcjxbtest.blob.core.chinacloudapi.cn/report/exam-sprint-outlook-report-report-001.pdf"));
 
         mockMvc.perform(get("/api/exam-sprint/reports/{reportId}/download", "report-001"))
                 .andExpect(status().isOk())