Skip to content

Instantly share code, notes, and snippets.

@oliverisaac
Created October 8, 2025 20:43
Show Gist options
  • Save oliverisaac/993f4781c14e441459d7c065e90191c4 to your computer and use it in GitHub Desktop.
Save oliverisaac/993f4781c14e441459d7c065e90191c4 to your computer and use it in GitHub Desktop.
// jenkinsLibraries/srctest/com/wealthfront/jenkins/DockerReleaseTargetTest.groovy
package com.wealthfront.jenkins
import com.lesfurets.jenkins.unit.BasePipelineTest
import org.junit.Test
class DockerReleaseTargetTest extends BasePipelineTest {
@Test
void testDockerReleaseTarget_withOwner() {
def script = loadScript('vars/helper.groovy')
def drt = script.newDockerReleaseTarget()
.withOwner('devops')
assert drt.createEcrScript().contains('Key=owner,Value=devops')
}
@Test
void testDockerReleaseTarget_invalidOwnerShouldFail() {
def script = loadScript('vars/helper.groovy')
try {
def drt = script.newDockerReleaseTarget()
.withOwner('invalid-owner-name')
fail 'Expected exception was not thrown'
} catch (IllegalStateException x) {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment