Add basic license integ test
Original commit: elastic/x-pack-elasticsearch@248f2a745d
This commit is contained in:
parent
d54cf876cb
commit
bd416b7a73
|
@ -16,6 +16,8 @@
|
|||
-->
|
||||
<keys.path>${basedir}/src/test/resources</keys.path>
|
||||
<license.basedir combine.self="override">${project.parent.basedir}</license.basedir>
|
||||
<tests.rest.suite>license</tests.rest.suite>
|
||||
<tests.rest.load_packaged>false</tests.rest.load_packaged>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"licenses": {
|
||||
"documentation": "https://www.elastic.co/guide/en/shield/current/license-management.html",
|
||||
"methods": ["GET"],
|
||||
"url": {
|
||||
"path": "/_licenses",
|
||||
"paths": ["/_licenses"],
|
||||
"parts" : {
|
||||
},
|
||||
"params": {
|
||||
"local": {
|
||||
"type" : "boolean",
|
||||
"description" : "Return local information, do not retrieve the state from master node (default: false)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"body": null
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
"licenses endpoint exists":
|
||||
- do: {licenses: {}}
|
||||
- match: {licenses: []}
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
package org.elasticsearch.license.plugin.rest;
|
||||
|
||||
|
||||
import com.carrotsearch.randomizedtesting.annotations.Name;
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
import org.elasticsearch.test.rest.ElasticsearchRestTestCase;
|
||||
import org.elasticsearch.test.rest.RestTestCandidate;
|
||||
import org.elasticsearch.test.rest.parser.RestTestParseException;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class LicensesRestIT extends ElasticsearchRestTestCase {
|
||||
|
||||
public LicensesRestIT(@Name("yaml") RestTestCandidate testCandidate) {
|
||||
super(testCandidate);
|
||||
}
|
||||
|
||||
@ParametersFactory
|
||||
public static Iterable<Object[]> parameters() throws IOException, RestTestParseException {
|
||||
return ElasticsearchRestTestCase.createParameters(0, 1);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue