Platinum integration test (#772)

🎉
This commit is contained in:
Tomas Della Vedova
2019-03-01 08:42:56 +01:00
committed by GitHub
parent 36163f4822
commit ed3cca0fe6
24 changed files with 563 additions and 78 deletions

View File

@ -62,7 +62,7 @@ function buildMlDeleteCalendarEvent (opts) {
}
// check required url components
if ((params['event_id'] != null || params['eventId'] != null) && ((params['calendar_id'] == null || params['calendarId']))) {
if ((params['event_id'] != null || params['eventId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) {
return callback(
new ConfigurationError('Missing required parameter of the url: calendar_id'),
result

View File

@ -62,7 +62,7 @@ function buildMlDeleteCalendarJob (opts) {
}
// check required url components
if ((params['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null || params['calendarId']))) {
if ((params['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) {
return callback(
new ConfigurationError('Missing required parameter of the url: calendar_id'),
result

View File

@ -60,7 +60,7 @@ function buildMlDeleteForecast (opts) {
}
// check required url components
if ((params['forecast_id'] != null || params['forecastId'] != null) && ((params['job_id'] == null || params['jobId']))) {
if ((params['forecast_id'] != null || params['forecastId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
return callback(
new ConfigurationError('Missing required parameter of the url: job_id'),
result

View File

@ -62,7 +62,7 @@ function buildMlDeleteModelSnapshot (opts) {
}
// check required url components
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null || params['jobId']))) {
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
return callback(
new ConfigurationError('Missing required parameter of the url: job_id'),
result

View File

@ -109,7 +109,7 @@ function buildMlFindFileStructure (opts) {
const request = {
method,
path,
body: body || '',
bulkBody: body,
querystring
}

View File

@ -70,7 +70,7 @@ function buildMlGetBuckets (opts) {
}
// check required url components
if (params['timestamp'] != null && ((params['job_id'] == null || params['jobId']))) {
if (params['timestamp'] != null && ((params['job_id'] == null && params['jobId'] == null))) {
return callback(
new ConfigurationError('Missing required parameter of the url: job_id'),
result

View File

@ -62,7 +62,7 @@ function buildMlGetModelSnapshots (opts) {
}
// check required url components
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null || params['jobId']))) {
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
return callback(
new ConfigurationError('Missing required parameter of the url: job_id'),
result

View File

@ -62,7 +62,7 @@ function buildMlPutCalendarJob (opts) {
}
// check required url components
if ((params['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null || params['calendarId']))) {
if ((params['job_id'] != null || params['jobId'] != null) && ((params['calendar_id'] == null && params['calendarId'] == null))) {
return callback(
new ConfigurationError('Missing required parameter of the url: calendar_id'),
result

View File

@ -58,7 +58,7 @@ function buildMlRevertModelSnapshot (opts) {
}
// check required url components
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null || params['jobId']))) {
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
return callback(
new ConfigurationError('Missing required parameter of the url: job_id'),
result

View File

@ -63,7 +63,7 @@ function buildMlUpdateModelSnapshot (opts) {
}
// check required url components
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null || params['jobId']))) {
if ((params['snapshot_id'] != null || params['snapshotId'] != null) && ((params['job_id'] == null && params['jobId'] == null))) {
return callback(
new ConfigurationError('Missing required parameter of the url: job_id'),
result

View File

@ -80,7 +80,13 @@ function buildSecurityGetPrivileges (opts) {
var path = ''
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
if (application && name) {
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application) + '/' + encodeURIComponent(name)
} else if (application) {
path = '/' + '_security' + '/' + 'privilege' + '/' + encodeURIComponent(application)
} else {
path = '/' + '_security' + '/' + 'privilege'
}
// build request object
const request = {

View File

@ -56,7 +56,7 @@ function buildXpackWatcherAckWatch (opts) {
}
// check required url components
if ((params['action_id'] != null || params['actionId'] != null) && ((params['watch_id'] == null || params['watchId']))) {
if ((params['action_id'] != null || params['actionId'] != null) && ((params['watch_id'] == null && params['watchId'] == null))) {
return callback(
new ConfigurationError('Missing required parameter of the url: watch_id'),
result