3535
3636import static org .eclipse .jgit .lib .ConfigConstants .*;
3737import static org .jenkinsci .plugins .gogs .JenkinsHandler .waitUntilJenkinsHasBeenStartedUp ;
38- import static org .junit .Assert .*;
38+ import static org .junit .Assert .assertEquals ;
39+ import static org .junit .Assert .fail ;
3940
4041//FIXME: the test should run in sequence
4142
@@ -48,7 +49,7 @@ public class GogsWebHook_IT {
4849 public static final String GOGS_PASSWORD = "butler" ;
4950 public static final String WEBHOOK_URL = "http://localhost:8080/job/testRep1/build?delay=0" ;
5051 public static final String JSON_COMMANDFILE_PATH = "target/test-classes/Gogs-config-json/" ;
51- public static final String JENKINS_CONFIGS_PATH = "target/test-classes/jenkins -config/" ;
52+ public static final String JENKINS_CONFIGS_PATH = "target/test-classes/Jenkins -config/" ;
5253 public static final String JENKINS_JOB_NAME = "test project" ;
5354 final Logger log = LoggerFactory .getLogger (GogsWebHook_IT .class );
5455
@@ -117,12 +118,11 @@ public void smokeTest_build_masterBranch() throws Exception {
117118 waitUntilJenkinsHasBeenStartedUp (jenkins );
118119
119120
120-
121121 //Check if the job exist. If not create it.
122122 Job job = jenkins .getJob (JENKINS_JOB_NAME );
123123 if (job == null ) {
124124 //Read the job configuration into a string
125- File jenkinsConfigFile = new File (JENKINS_CONFIGS_PATH +"test-project.xml" );
125+ File jenkinsConfigFile = new File (JENKINS_CONFIGS_PATH + "test-project.xml" );
126126 byte [] encoded = Files .readAllBytes (jenkinsConfigFile .toPath ());
127127 String configXml = new String (encoded , Charset .defaultCharset ());
128128
@@ -147,7 +147,6 @@ public void smokeTest_build_masterBranch() throws Exception {
147147 assertEquals ("Not the expected GIT commit" , commit .getName (), buildedCommit );
148148
149149
150-
151150 //add the trigger to Gogs
152151 File jsonCommandFile = new File (JSON_COMMANDFILE_PATH + "webHookDefinition.json" );
153152 int hookId = gogsServer .createWebHook (jsonCommandFile , "testRep1" );
0 commit comments