Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 72548b798a | |||
| 342ceee28d |
@@ -83,12 +83,12 @@ spec:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ $.Release.Name }}-{{ $.Chart.Name }}-secret
|
||||
key: app.s3.accessKey
|
||||
key: accessKey
|
||||
- name: S3_SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ $.Release.Name }}-{{ $.Chart.Name }}-secret
|
||||
key: app.s3.secretKey
|
||||
key: secretKey
|
||||
volumeMounts:
|
||||
- mountPath: '/opt/app/config'
|
||||
name: application-properties-volume
|
||||
|
||||
@@ -7,7 +7,6 @@ import kotlinx.serialization.Serializable
|
||||
data class CreateMirrorRequest(
|
||||
@field:NotBlank(message = "itemId must not be blank")
|
||||
val itemId: String,
|
||||
@field:NotBlank(message = "sourceUrl must not be blank")
|
||||
val sourceUrl: String,
|
||||
val sourceUrl: String = "",
|
||||
val sourceType: String = "jellyfin",
|
||||
)
|
||||
|
||||
@@ -83,6 +83,21 @@ class MirrorControllerTest : AbstractIntegrationTest() {
|
||||
assertEquals(1, count)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `POST mirror without sourceUrl creates a job`() {
|
||||
mockMvc.perform(
|
||||
post("/api/mirror")
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content("""{"itemId":"no-url-id"}"""),
|
||||
).andExpect(status().isCreated)
|
||||
|
||||
val response = json.decodeFromString<ByItemResponse>(
|
||||
bodyOf(mockMvc.perform(get("/api/mirror/by-item/no-url-id")).andExpect(status().isOk).andReturn()),
|
||||
)
|
||||
assertEquals("no-url-id", response.itemId)
|
||||
assertEquals("new", response.status)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `POST mirror returns 400 on blank itemId`() {
|
||||
postCreate("", "https://source.example/stream")
|
||||
|
||||
Reference in New Issue
Block a user