Skip to content

Commit

Permalink
Delete tasks after test
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Oct 22, 2024
1 parent b86da43 commit 30793c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ export default function ({ getService }: FtrProviderContext) {
const monitoredAggregatedStatsRefreshRate = 5000;

describe('health', () => {
afterEach(async () => {
// clean up after each test
return await supertest.delete('/api/sample_tasks').set('kbn-xsrf', 'xxx').expect(200);
});

it('should return basic configuration of task manager', async () => {
const health = await getHealth();
expect(health.status).to.eql('OK');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ export default function ({ getService }: FtrProviderContext) {
await esArchiver.unload('x-pack/test/functional/es_archives/task_manager_removed_types');
});

afterEach(async () => {
// clean up after each test
return await request.delete('/api/sample_tasks').set('kbn-xsrf', 'xxx').expect(200);
});

function scheduleTask(
task: Partial<ConcreteTaskInstance | DeprecatedConcreteTaskInstance>
): Promise<SerializedConcreteTaskInstance> {
Expand Down

0 comments on commit 30793c0

Please sign in to comment.