Fix reporting api tests for cloud (#116515) (#117231)

* Fix reporting api tests for cloud

* Add default value

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: liza-mae <liza-mae@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2021-11-02 18:31:23 -04:00 committed by GitHub
parent 3652661104
commit aadb238577
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,7 +132,11 @@ export function createScenarios({ getService }: Pick<FtrProviderContext, 'getSer
.set('kbn-xsrf', 'xxx')
.send({ jobParams });
};
const generateCsv = async (job: JobParamsCSV, username = 'elastic', password = 'changeme') => {
const generateCsv = async (
job: JobParamsCSV,
username = 'elastic',
password = process.env.TEST_KIBANA_PASS || 'changeme'
) => {
const jobParams = rison.encode(job as object as RisonValue);
return await supertestWithoutAuth
.post(`/api/reporting/generate/csv_searchsource`)