Last active
November 15, 2016 21:03
-
-
Save jsanda/92be694111cca8dfb3f2b6ce8d826d78 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// I put this class in the rest-tests-jaxrs module. | |
class NullStringITest extends RESTTest { | |
@Test | |
void nullStrings() { | |
String tenantId = nextTenantId() | |
def response = hawkularMetrics.post( | |
path: 'strings', | |
body: [ | |
id: 'NULL-STRING', | |
dataRetention: 10 | |
], | |
headers: [(tenantHeaderName): tenantId] | |
) | |
assertEquals(201, response.status) | |
response = hawkularMetrics.post( | |
path: "strings/NULL-STRING/raw", | |
headers: [(tenantHeaderName): tenantId], | |
body: [ | |
[timestamp: 10000, value: "TEST 1"] | |
] | |
) | |
response = hawkularMetrics.post( | |
path: "gauges/NULL-STRING/raw", | |
headers: [(tenantHeaderName): tenantId], | |
body: [ | |
[timestamp: 10000, value: 3.14] | |
] | |
) | |
assertEquals(200, response.status) | |
response = hawkularMetrics.get( | |
path: "metrics", | |
headers: [(tenantHeaderName): tenantId], | |
query: [type: 'string'] | |
) | |
assertEquals(200, response.status) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment