Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Archive Migration][Partial] discover apps-home #110440

Merged
merged 2 commits into from
Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions test/functional/apps/getting_started/_shakespeare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {

after(async () => {
await security.testUser.restoreDefaults();
await esArchiver.unload('test/functional/fixtures/es_archiver/getting_started/shakespeare');
await kibanaServer.uiSettings.replace({});
});

it('should create shakespeare index pattern', async function () {
Expand Down
11 changes: 9 additions & 2 deletions test/functional/apps/home/_navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'header', 'home', 'timePicker']);
const appsMenu = getService('appsMenu');
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');

describe('Kibana browser back navigation should work', function describeIndexTests() {
before(async () => {
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/discover');
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional');
await esArchiver.load('test/functional/fixtures/es_archiver/logstash_functional');
await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*' });
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
});

after(async () => {
await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor request to also add this here. I'm sure we don't do it everywhere but since there's a call to .replace({ defaultIndex: 'logstash-*' }); it's probably best to clear it out too;

await kibanaServer.uiSettings.replace({});

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but now I'm also wondering if unloading the kbn_archive unloads the config saved object? That's where the default index pattern is saved. You could check by looking in Advanced Settings after this test runs and see if it's set.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so I've been having issues starting the ftr server, for the last few days.
That said, I was able to use the saved objects info cli call.
After dropping out most of the test, and leaving the before and after calls in place (I also added the ui settings replace you asked for above), I got this:

node scripts/saved_objs_info.js --esUrl http://elastic:changeme@localhost:9220 --soTypes
 succ
      ### Saved Object Types Count: 6
      [
        {
          doc_count: 5,
          key: 'canvas-workpad-template'
        },
        {
          doc_count: 1,
          key: 'apm-telemetry'
        },
        {
          doc_count: 1,
          key: 'config'
        },
        {
          doc_count: 1,
          key: 'core-usage-stats'
        },
        {
          doc_count: 1,
          key: 'event_loop_delays_daily'
        },
        {
          doc_count: 1,
          key: 'space'
        }
      ]

So, the config count so type count, is 1.

I think that means we are good. Your thoughts sir? @LeeDr

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, in case you were wondering, when I run the call just after staring the ftr server, I get this:

node scripts/saved_objs_info.js --esUrl http://elastic:changeme@localhost:9220 --soTypes
 succ
      ### Saved Object Types Count: 4
      [
        {
          doc_count: 5,
          key: 'canvas-workpad-template'
        },
        {
          doc_count: 1,
          key: 'apm-telemetry'
        },
        {
          doc_count: 1,
          key: 'config'
        },
        {
          doc_count: 1,
          key: 'space'
        }
      ]

await kibanaServer.uiSettings.replace({});
});

it('detect navigate back issues', async () => {
Expand Down