From 6bee73a0781bd22d21aa7c75a7778caca83d0aed Mon Sep 17 00:00:00 2001 From: Carlos Miranda Date: Tue, 11 Mar 2014 22:28:29 +0800 Subject: [PATCH] Issue #636 Randomized tag name for creation and patch --- src/test/java/com/jcabi/github/RtReleaseITCase.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/jcabi/github/RtReleaseITCase.java b/src/test/java/com/jcabi/github/RtReleaseITCase.java index 9b3c7188a..a1bad39ed 100644 --- a/src/test/java/com/jcabi/github/RtReleaseITCase.java +++ b/src/test/java/com/jcabi/github/RtReleaseITCase.java @@ -29,9 +29,11 @@ */ package com.jcabi.github; +import com.jcabi.aspects.Tv; import java.io.IOException; import javax.json.Json; import javax.json.JsonObject; +import org.apache.commons.lang3.RandomStringUtils; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.junit.After; @@ -69,7 +71,9 @@ public void setUp() throws IOException { this.repo = github.repos().get( new Coordinates.Simple(System.getProperty("failsafe.github.repo")) ); - this.release = this.repo.releases().create("jcabi_test_tag"); + this.release = this.repo.releases().create( + RandomStringUtils.randomAlphanumeric(Tv.TEN) + ); } /** @@ -90,7 +94,7 @@ public void tearDown() throws IOException { @Test public void canEditRelease() throws Exception { final JsonObject patch = Json.createObjectBuilder() - .add("tag_name", "v23") + .add("tag_name", RandomStringUtils.randomAlphanumeric(Tv.TEN)) .add("name", "JCabi Github test release") .add("body", "JCabi Github was here!") .build();