Skip to content

Commit 19fabf6

Browse files
committed
Fix integration test
1 parent af33226 commit 19fabf6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/org/jenkinsci/plugins/gogs/GogsWebHookTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.jenkinsci.plugins.gogs;
22

3+
import hudson.util.Secret;
34
import org.apache.commons.io.FileUtils;
45
import org.apache.commons.io.IOUtils;
56
import org.junit.Before;
@@ -235,6 +236,7 @@ public void whenUriDoesNotContainUrlNameMustReturnError() throws Exception {
235236

236237
@Test
237238
public void whenJobBranchNotMatchMustReturnError() throws Exception {
239+
Secret secret = Secret.fromString(null);
238240
String[][] test_vals = {
239241
{null, "master", "true"},
240242
{null, "dev", "true"},
@@ -253,7 +255,7 @@ public void whenJobBranchNotMatchMustReturnError() throws Exception {
253255
String ref = test_vals[i][1];
254256
boolean ret = Boolean.parseBoolean(test_vals[i][2]);
255257

256-
GogsProjectProperty property = new GogsProjectProperty(null, false, filter);
258+
GogsProjectProperty property = new GogsProjectProperty(secret, false, filter);
257259
assertSame(String.format("branch filter check failed for [%s -> %s]", ref, filter), ret, property.filterBranch(ref));
258260
}
259261

0 commit comments

Comments
 (0)