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

[Fleet] Add registry config for failing Jest integration tests + unskip #198840

Merged
merged 6 commits into from
Nov 9, 2024
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
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
Loading