All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.nemerosa.ontrack.kdsl.spec.extension.notifications.webhooks.InternalEndpointMgtExtensions.kt Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.kdsl.spec.extension.notifications.webhooks

fun InternalEndpointMgt.testOk(
    webhookName: String,
    content: String,
    delayMs: Long? = null,
) = test(
    TestPayloadWrapper(
        webhook = webhookName,
        payload = TestPayload(
            mode = TestPayloadMode.OK,
            content = content,
            delayMs = delayMs,
        )
    )
)

fun InternalEndpointMgt.testNotFound(
    webhookName: String,
    content: String,
) = test(
    TestPayloadWrapper(
        webhook = webhookName,
        payload = TestPayload(
            mode = TestPayloadMode.NOT_FOUND,
            content = content,
        )
    )
)

fun InternalEndpointMgt.testError(
    webhookName: String,
    content: String,
) = test(
    TestPayloadWrapper(
        webhook = webhookName,
        payload = TestPayload(
            mode = TestPayloadMode.INTERNAL_ERROR,
            content = content,
        )
    )
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy