-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Log clientId tag if it is in query params (#18)
* Pick up latest version of io.mantisrx, use shaded ObjectMapper to serialize/deserialize objects * Remove jackson dependency * Handle NPE in websocket upgrade check * Fix breaking changes from zuul-core 2.1.8 * Make ./gradlew run work again after zuul version upgrade * Log clientId if it is in query params * revert build.gradle Co-authored-by: Calvin Cheung <[email protected]>
- Loading branch information
Showing
5 changed files
with
48 additions
and
4 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
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
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
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
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,34 @@ | ||
package io.mantisrx.api; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertArrayEquals; | ||
|
||
public class UtilTest { | ||
|
||
@Test | ||
public void testGetTagList() { | ||
String[] tags = Util.getTaglist("/jobconnectbyname/rx-sps-tracker?clientId=testClientId", "testTargetId", "us-east-1"); | ||
assertArrayEquals(new String[]{ | ||
"clientId", "testClientId", | ||
"SessionId", "testTargetId", | ||
"urlPath", "/jobconnectbyname/rx-sps-tracker", | ||
"region", "us-east-1"}, tags); | ||
|
||
tags = Util.getTaglist("/jobconnectbyname/rx-sps-tracker?clientId=testClientId&MantisApiTag=tag1:value1", "testTargetId", "us-east-1"); | ||
assertArrayEquals(new String[]{ | ||
"tag1", "value1", | ||
"clientId", "testClientId", | ||
"SessionId", "testTargetId", | ||
"urlPath", "/jobconnectbyname/rx-sps-tracker", | ||
"region", "us-east-1"}, tags); | ||
|
||
tags = Util.getTaglist("/jobconnectbyname/rx-sps-tracker?clientId=testClientId&MantisApiTag=tag1:value1&MantisApiTag=clientId:testClientId2", "testTargetId", "us-east-1"); | ||
assertArrayEquals(new String[]{ | ||
"tag1", "value1", | ||
"clientId", "testClientId2", | ||
"SessionId", "testTargetId", | ||
"urlPath", "/jobconnectbyname/rx-sps-tracker", | ||
"region", "us-east-1"}, tags); | ||
} | ||
} |