-
-
Save oliverisaac/993f4781c14e441459d7c065e90191c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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