From 55069fbad248fdbb3aa96b382944560257d19f51 Mon Sep 17 00:00:00 2001 From: Sonja Krause-Harder Date: Mon, 6 Jul 2020 18:57:18 +0200 Subject: [PATCH] [Ingest Manager] Update package registry docker image for CI. (#70716) * Update package registry docker image for CI. * Adapt to new registry filesystem layout. * Adjust tests to changed registry behavior. Co-authored-by: Elastic Machine --- .../test/ingest_manager_api_integration/apis/file.ts | 6 +++--- .../apis/fixtures/package_registry_config.yml | 4 ++-- x-pack/test/ingest_manager_api_integration/config.ts | 10 +++++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/x-pack/test/ingest_manager_api_integration/apis/file.ts b/x-pack/test/ingest_manager_api_integration/apis/file.ts index 33eeda1ee274..a7462ac51ecc 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/file.ts +++ b/x-pack/test/ingest_manager_api_integration/apis/file.ts @@ -47,7 +47,7 @@ export default function ({ getService }: FtrProviderContext) { '/api/ingest_manager/epm/packages/filetest/0.1.0/kibana/visualization/sample_visualization.json' ) .set('kbn-xsrf', 'xxx') - .expect('Content-Type', 'application/json; charset=utf-8') + .expect('Content-Type', 'text/plain; charset=utf-8') .expect(200); } else { warnAndSkipTest(this, log); @@ -61,7 +61,7 @@ export default function ({ getService }: FtrProviderContext) { '/api/ingest_manager/epm/packages/filetest/0.1.0/kibana/dashboard/sample_dashboard.json' ) .set('kbn-xsrf', 'xxx') - .expect('Content-Type', 'application/json; charset=utf-8') + .expect('Content-Type', 'text/plain; charset=utf-8') .expect(200); } else { warnAndSkipTest(this, log); @@ -73,7 +73,7 @@ export default function ({ getService }: FtrProviderContext) { await supertest .get('/api/ingest_manager/epm/packages/filetest/0.1.0/kibana/search/sample_search.json') .set('kbn-xsrf', 'xxx') - .expect('Content-Type', 'application/json; charset=utf-8') + .expect('Content-Type', 'text/plain; charset=utf-8') .expect(200); } else { warnAndSkipTest(this, log); diff --git a/x-pack/test/ingest_manager_api_integration/apis/fixtures/package_registry_config.yml b/x-pack/test/ingest_manager_api_integration/apis/fixtures/package_registry_config.yml index 0060e247827d..5bfbf78e25ed 100644 --- a/x-pack/test/ingest_manager_api_integration/apis/fixtures/package_registry_config.yml +++ b/x-pack/test/ingest_manager_api_integration/apis/fixtures/package_registry_config.yml @@ -1,3 +1,3 @@ package_paths: - - /registry/packages/package-storage - - /registry/packages/test-packages \ No newline at end of file + - /packages/production + - /packages/test-packages \ No newline at end of file diff --git a/x-pack/test/ingest_manager_api_integration/config.ts b/x-pack/test/ingest_manager_api_integration/config.ts index bbef12463ed0..88ec8d53c1cd 100644 --- a/x-pack/test/ingest_manager_api_integration/config.ts +++ b/x-pack/test/ingest_manager_api_integration/config.ts @@ -21,21 +21,25 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { `${path.join( path.dirname(__filename), './apis/fixtures/package_registry_config.yml' - )}:/registry/config.yml`, + )}:/package-registry/config.yml`, '-v', `${path.join( path.dirname(__filename), './apis/fixtures/test_packages' - )}:/registry/packages/test-packages`, + )}:/packages/test-packages`, ]; + // Docker image to use for Ingest Manager API integration tests. + const dockerImage = + 'docker.elastic.co/package-registry/distribution:184b85f19e8fd14363e36150173d338ff9659f01'; + return { testFiles: [require.resolve('./apis')], servers: xPackAPITestsConfig.get('servers'), dockerServers: defineDockerServersConfig({ registry: { enabled: !!registryPort, - image: 'docker.elastic.co/package-registry/package-registry:kibana-testing-1', + image: dockerImage, portInContainer: 8080, port: registryPort, args: dockerArgs,