Skip to content

Commit

Permalink
[Fleet] Add registry config for failing Jest integration tests + unsk…
Browse files Browse the repository at this point in the history
…ip (elastic#198840)

## Summary

Closes elastic#192713

Add `kibanaVersionCheckEnabled: false` to Jest integration test config +
unskip failing 9.0 Jest integration tests.

---------

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
kpollich and elasticmachine authored Nov 9, 2024
1 parent cb7e5f6 commit 18a0933
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
const logFilePath = Path.join(__dirname, 'logs.log');

// Failing 9.0 version update: https://github.com/elastic/kibana/issues/192624
describe.skip('Fleet cloud preconfiguration', () => {
describe('Fleet cloud preconfiguration', () => {
let esServer: TestElasticsearchUtils;
let kbnServer: TestKibanaUtils;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
export const CLOUD_KIBANA_CONFIG = {
xpack: {
fleet: {
internal: {
registry: {
kibanaVersionCheckEnabled: false,
},
},
packages: [
{
name: 'apm',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const createAndSetupRoot = async (config?: object) => {
* Verifies that multiple Kibana instances running in parallel will not create duplicate preconfiguration objects.
*/
// Failing 9.0 version update: https://github.com/elastic/kibana/issues/192624
describe.skip('Fleet setup preconfiguration with multiple instances Kibana', () => {
describe('Fleet setup preconfiguration with multiple instances Kibana', () => {
let esServer: TestElasticsearchUtils;
// let esClient: Client;
let roots: Root[] = [];
Expand Down Expand Up @@ -175,6 +175,11 @@ describe.skip('Fleet setup preconfiguration with multiple instances Kibana', ()

const preconfiguration = {
registryUrl,
internal: {
registry: {
kibanaVersionCheckEnabled: false,
},
},
packages: [
{
name: 'fleet_server',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { useDockerRegistry, waitForFleetSetup, getSupertestWithAdminUser } from
const logFilePath = Path.join(__dirname, 'logs.log');

// Failing 9.0 version update: https://github.com/elastic/kibana/issues/192624
describe.skip('Fleet preconfiguration reset', () => {
describe('Fleet preconfiguration reset', () => {
let esServer: TestElasticsearchUtils;
let kbnServer: TestKibanaUtils;

Expand All @@ -47,6 +47,11 @@ describe.skip('Fleet preconfiguration reset', () => {
xpack: {
fleet: {
registryUrl,
internal: {
registry: {
kibanaVersionCheckEnabled: false,
},
},
packages: [
{
name: 'fleet_server',
Expand Down Expand Up @@ -253,7 +258,7 @@ describe.skip('Fleet preconfiguration reset', () => {
);
await resetAPI
.set('kbn-sxrf', 'xx')
.set('Elastic-Api-Version', `${API_VERSIONS.internal.v1}`)
.set('Elastic-Api-Version', `${API_VERSIONS.public.v1}`)
.expect(200)
.send();

Expand Down Expand Up @@ -298,7 +303,7 @@ describe.skip('Fleet preconfiguration reset', () => {
);
await resetAPI
.set('kbn-sxrf', 'xx')
.set('Elastic-Api-Version', `${API_VERSIONS.internal.v1}`)
.set('Elastic-Api-Version', `${API_VERSIONS.public.v1}`)
.expect(200)
.send();

Expand Down Expand Up @@ -336,7 +341,7 @@ describe.skip('Fleet preconfiguration reset', () => {
);
await resetAPI
.set('kbn-sxrf', 'xx')
.set('Elastic-Api-Version', `${API_VERSIONS.internal.v1}`)
.set('Elastic-Api-Version', `${API_VERSIONS.public.v1}`)
.expect(200)
.send();

Expand Down Expand Up @@ -373,7 +378,7 @@ describe.skip('Fleet preconfiguration reset', () => {
);
await resetAPI
.set('kbn-sxrf', 'xx')
.set('Elastic-Api-Version', `${API_VERSIONS.internal.v1}`)
.set('Elastic-Api-Version', `${API_VERSIONS.public.v1}`)
.expect(200)
.send();

Expand Down
8 changes: 4 additions & 4 deletions x-pack/plugins/fleet/server/routes/preconfiguration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export const registerRoutes = (router: FleetAuthzRouter) => {
router.versioned
.post({
path: PRECONFIGURATION_API_ROUTES.RESET_PATTERN,
access: 'internal',
access: 'public',
fleetAuthz: {
fleet: { all: true },
},
})
.addVersion(
{
version: API_VERSIONS.internal.v1,
version: API_VERSIONS.public.v1,
validate: false,
},

Expand All @@ -34,14 +34,14 @@ export const registerRoutes = (router: FleetAuthzRouter) => {
router.versioned
.post({
path: PRECONFIGURATION_API_ROUTES.RESET_ONE_PATTERN,
access: 'internal',
access: 'public',
fleetAuthz: {
fleet: { all: true },
},
})
.addVersion(
{
version: API_VERSIONS.internal.v1,
version: API_VERSIONS.public.v1,
validate: { request: PostResetOnePreconfiguredAgentPoliciesSchema },
},
resetOnePreconfigurationHandler
Expand Down

0 comments on commit 18a0933

Please sign in to comment.