Skip to content

Commit

Permalink
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
Browse files Browse the repository at this point in the history
…-fix'
  • Loading branch information
kibanamachine committed Oct 27, 2022
1 parent 37129bc commit fa1ce1f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/common/services/es_delete_all_indices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function EsDeleteAllIndicesProvider({ getService }: FtrProviderContext) {
}

return async (patterns: string | string[], remote: boolean = false) => {
const esNode = remote ? getService('remoteEs' as 'es') : getService('es')
const esNode = remote ? getService('remoteEs' as 'es') : getService('es');
for (const pattern of [patterns].flat()) {
for (let attempt = 1; ; attempt++) {
if (attempt > 5) {
Expand Down
16 changes: 9 additions & 7 deletions x-pack/test/functional/apps/rollup_job/rollup_jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,27 @@ import { mockIndices } from './hybrid_index_helper';
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const config = getService('config')
const config = getService('config');
const PageObjects = getPageObjects(['rollup', 'common', 'security']);
const security = getService('security');
const esDeleteAllIndices = getService('esDeleteAllIndices');
const kibanaServer = getService('kibanaServer');
const es = getService('es');
const isRunningCcs = config.get('esTestCluster.ccs') ? true : false;
const isRunningCcs = config.get('esTestCluster.ccs') ? true : false;
let remoteEs;
if (isRunningCcs) {
remoteEs = getService('remoteEs' as 'es');
};
}

describe.only('rollup job', function () {
// Since rollups can only be created once with the same name (even if you delete it),
// we add the Date.now() to avoid name collision.
const rollupJobName = 'rollup-to-be-' + Date.now();
const targetIndexName = 'rollup-to-be';
const indexPatternToUse = 'to-be*'
const rollupSourceIndexPattern = isRunningCcs ? 'ftr-remote:'+ indexPatternToUse: indexPatternToUse;
const indexPatternToUse = 'to-be*';
const rollupSourceIndexPattern = isRunningCcs
? 'ftr-remote:' + indexPatternToUse
: indexPatternToUse;
const rollupSourceDataPrepend = 'to-be';

// make sure all dates have the same concept of "now"
Expand Down Expand Up @@ -78,9 +80,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

// Delete all data indices that were created.
await esDeleteAllIndices([targetIndexName], false)
await esDeleteAllIndices([targetIndexName], false);
if (isRunningCcs) {
await esDeleteAllIndices([indexPatternToUse], true)
await esDeleteAllIndices([indexPatternToUse], true);
} else {
await esDeleteAllIndices([indexPatternToUse], false);
}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/functional/config.ccs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
remoteClusterUrl:
process.env.REMOTE_CLUSTER_URL ??
'http://elastic:changeme@localhost:' +
`${functionalConfig.get('servers.elasticsearch.port') + 1}`,
`${functionalConfig.get('servers.elasticsearch.port') + 1}`,
},
},
services: {
Expand Down

0 comments on commit fa1ce1f

Please sign in to comment.