kibana/x-pack/test/spaces_api_integration/spaces_only/config.ts
elena-shostak e8cdde2fb6
[Spaces] Added disabled features back to mappings (#184195)
## Summary

We aggregate on disabledFeatures in [Spaces Usage
Collector](5e95a76796/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts (L38)),
but field was removed from mappings. Added `disabledFeatures` back to
mappings.

### How to Test

1. Create a couple of spaces with disabled features.
   ```
   POST kbn:/api/spaces/space 
   {
      "name": "my-space-1",
      "id": "my-space-1",
      "description": "a description",
      "color": "#5c5959",
      "disabledFeatures": ["canvas", "discover"]
   }
   
   POST kbn:/api/spaces/space 
   {
      "name": "my-space-2",
      "id": "my-space-2",
      "description": "a description",
      "color": "#5c5959",
      "disabledFeatures": ["savedObjectsManagement", "canvas"]
   }
   ```
2. Make a request to stats endpoint and check that `disabledFeatures`
counters.
    ```
    POST kbn:/internal/telemetry/clusters/_stats
    {
      "unencrypted": true, "refreshCache": true
    }
    ```

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

__Fixes: https://github.com/elastic/kibana/issues/184194__

## Release note
Added `disabledFeatures` back to mappings, so it can be aggregated on.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-29 15:55:21 +02:00

15 lines
541 B
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { createTestConfig } from '../common/config';
// eslint-disable-next-line import/no-default-export
export default createTestConfig('spaces_only', {
disabledPlugins: ['security'],
license: 'basic',
testFiles: [require.resolve('./telemetry'), require.resolve('./apis')],
});