-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure the TFS SDK native folder's location automatically.
This avoids having to add the com.microsoft.tfs.jni.native.base-directory property in the container's configuration file. Added an integration test to verify the functionality.
- Loading branch information
1 parent
0f719b1
commit 88baa47
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
25 changes: 25 additions & 0 deletions
25
src/test/java/hudson/plugins/tfs/model/ServerIntegrationTest.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package hudson.plugins.tfs.model; | ||
|
||
import org.jvnet.hudson.test.JenkinsRule; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
|
||
import com.microsoft.tfs.core.TFSTeamProjectCollection; | ||
import com.microsoft.tfs.core.exceptions.TECoreException; | ||
|
||
public class ServerIntegrationTest { | ||
|
||
@Rule public JenkinsRule j = new JenkinsRule(); | ||
|
||
@Test(expected = TECoreException.class) | ||
/** | ||
* It's OK for this test to throw a TECoreException for "unknown host"; | ||
* it means we were able to load the native libraries, | ||
* otherwise an @link UnsatisfiedLinkError would have been thrown earlier. | ||
*/ | ||
public void canFindTfsSdkNativeLibraries() { | ||
final Server server = new Server(null, "http://tfs.invalid:8080/tfs", "username", "password"); | ||
final TFSTeamProjectCollection tpc = server.getTeamProjectCollection(); | ||
tpc.getVersionControlClient(); | ||
} | ||
} |