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

Revert connection_status code changes #425

Merged
merged 1 commit into from
Feb 1, 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
76 changes: 38 additions & 38 deletions src/remediations/__snapshots__/fifi.integration.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -93,42 +93,42 @@ exports[`FiFi connection status get connection status with false smartManagement
{
\\"endpoint_id\\": null,
\\"executor_id\\": \\"01bf542e-6092-485c-ba04-c656d77f988a\\",
\\"executor_type\\": \\"RHC-satellite\\",
\\"executor_type\\": \\"satellite\\",
\\"executor_name\\": \\"Satellite 01bf542e-6092-485c-ba04-c656d77f988a Org 2\\",
\\"system_count\\": 1,
\\"connection_status\\": \\"connected\\"
\\"connection_status\\": \\"no_smart_management\\"
},
{
\\"endpoint_id\\": null,
\\"executor_id\\": \\"409dd231-6297-43a6-a726-5ce56923d624\\",
\\"executor_type\\": \\"RHC-satellite\\",
\\"executor_type\\": \\"satellite\\",
\\"executor_name\\": \\"Satellite 409dd231-6297-43a6-a726-5ce56923d624 Org 2\\",
\\"system_count\\": 1,
\\"connection_status\\": \\"disconnected\\"
\\"connection_status\\": \\"no_smart_management\\"
},
{
\\"endpoint_id\\": null,
\\"executor_id\\": \\"63142926-46a5-498b-9614-01f2f66fd40b\\",
\\"executor_type\\": \\"RHC-satellite\\",
\\"executor_type\\": \\"satellite\\",
\\"executor_name\\": \\"Satellite 63142926-46a5-498b-9614-01f2f66fd40b Org 2\\",
\\"system_count\\": 5,
\\"connection_status\\": \\"connected\\"
\\"connection_status\\": \\"no_smart_management\\"
},
{
\\"endpoint_id\\": null,
\\"executor_id\\": \\"722ec903-f4b5-4b1f-9c2f-23fc7b0ba390\\",
\\"executor_type\\": \\"RHC-satellite\\",
\\"executor_type\\": \\"satellite\\",
\\"executor_name\\": \\"Satellite 722ec903-f4b5-4b1f-9c2f-23fc7b0ba390 Org 2\\",
\\"system_count\\": 3,
\\"connection_status\\": \\"connected\\"
\\"connection_status\\": \\"no_smart_management\\"
},
{
\\"endpoint_id\\": null,
\\"executor_id\\": \\"72f44b25-64a7-4ee7-a94e-3beed9393972\\",
\\"executor_type\\": \\"RHC-satellite\\",
\\"executor_type\\": \\"satellite\\",
\\"executor_name\\": \\"Satellite 72f44b25-64a7-4ee7-a94e-3beed9393972 Org 2\\",
\\"system_count\\": 3,
\\"connection_status\\": \\"connected\\"
\\"connection_status\\": \\"no_smart_management\\"
},
{
\\"endpoint_id\\": null,
Expand All @@ -151,16 +151,16 @@ exports[`FiFi connection status get connection status with false smartManagement
\\"executor_id\\": null,
\\"executor_type\\": \\"RHC\\",
\\"executor_name\\": null,
\\"system_count\\": 3,
\\"system_count\\": 1,
\\"connection_status\\": \\"connected\\"
},
{
\\"endpoint_id\\": null,
\\"executor_id\\": null,
\\"executor_type\\": \\"None\\",
\\"executor_type\\": \\"RHC\\",
\\"executor_name\\": null,
\\"system_count\\": 1,
\\"connection_status\\": \\"connected\\"
\\"system_count\\": 2,
\\"connection_status\\": \\"no_smart_management\\"
}
]
}"
Expand Down Expand Up @@ -259,41 +259,41 @@ exports[`FiFi connection status obtains connection status 1`] = `
{
\\"endpoint_id\\": null,
\\"executor_id\\": \\"01bf542e-6092-485c-ba04-c656d77f988a\\",
\\"executor_type\\": \\"RHC-satellite\\",
\\"executor_type\\": \\"satellite\\",
\\"executor_name\\": \\"Satellite 01bf542e-6092-485c-ba04-c656d77f988a Org 2\\",
\\"system_count\\": 1,
\\"connection_status\\": \\"no_source\\"
},
{
\\"endpoint_id\\": \\"805\\",
\\"executor_id\\": \\"722ec903-f4b5-4b1f-9c2f-23fc7b0ba390\\",
\\"executor_type\\": \\"satellite\\",
\\"executor_name\\": \\"Satellite 1 (connected)\\",
\\"system_count\\": 3,
\\"connection_status\\": \\"connected\\"
},
{
\\"endpoint_id\\": null,
\\"endpoint_id\\": \\"806\\",
\\"executor_id\\": \\"409dd231-6297-43a6-a726-5ce56923d624\\",
\\"executor_type\\": \\"RHC-satellite\\",
\\"executor_name\\": \\"Satellite 409dd231-6297-43a6-a726-5ce56923d624 Org 2\\",
\\"executor_type\\": \\"satellite\\",
\\"executor_name\\": \\"Satellite 2 (disconnected)\\",
\\"system_count\\": 1,
\\"connection_status\\": \\"disconnected\\"
},
{
\\"endpoint_id\\": null,
\\"executor_id\\": \\"63142926-46a5-498b-9614-01f2f66fd40b\\",
\\"executor_type\\": \\"RHC-satellite\\",
\\"executor_name\\": \\"Satellite 63142926-46a5-498b-9614-01f2f66fd40b Org 2\\",
\\"system_count\\": 5,
\\"connection_status\\": \\"connected\\"
},
{
\\"endpoint_id\\": null,
\\"executor_id\\": \\"722ec903-f4b5-4b1f-9c2f-23fc7b0ba390\\",
\\"executor_type\\": \\"RHC-satellite\\",
\\"executor_name\\": \\"Satellite 722ec903-f4b5-4b1f-9c2f-23fc7b0ba390 Org 2\\",
\\"executor_id\\": \\"72f44b25-64a7-4ee7-a94e-3beed9393972\\",
\\"executor_type\\": \\"satellite\\",
\\"executor_name\\": \\"Satellite 3 (no receptor configured)\\",
\\"system_count\\": 3,
\\"connection_status\\": \\"connected\\"
\\"connection_status\\": \\"no_receptor\\"
},
{
\\"endpoint_id\\": null,
\\"executor_id\\": \\"72f44b25-64a7-4ee7-a94e-3beed9393972\\",
\\"executor_type\\": \\"RHC-satellite\\",
\\"executor_name\\": \\"Satellite 72f44b25-64a7-4ee7-a94e-3beed9393972 Org 2\\",
\\"system_count\\": 3,
\\"endpoint_id\\": \\"808\\",
\\"executor_id\\": \\"63142926-46a5-498b-9614-01f2f66fd40b\\",
\\"executor_type\\": \\"satellite\\",
\\"executor_name\\": \\"Satellite 4 (connected)\\",
\\"system_count\\": 5,
\\"connection_status\\": \\"connected\\"
},
{
Expand All @@ -317,16 +317,16 @@ exports[`FiFi connection status obtains connection status 1`] = `
\\"executor_id\\": null,
\\"executor_type\\": \\"RHC\\",
\\"executor_name\\": null,
\\"system_count\\": 3,
\\"system_count\\": 2,
\\"connection_status\\": \\"connected\\"
},
{
\\"endpoint_id\\": null,
\\"executor_id\\": null,
\\"executor_type\\": \\"None\\",
\\"executor_type\\": \\"RHC\\",
\\"executor_name\\": null,
\\"system_count\\": 1,
\\"connection_status\\": \\"connected\\"
\\"connection_status\\": \\"no_rhc\\"
}
]
}"
Expand Down
4 changes: 2 additions & 2 deletions src/remediations/fifi.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ describe('FiFi', function () {
.set(auth.fifi)
.expect(200);

headers.etag.should.equal('"b3f-ap0xZBE6LAEw4CWgNSPJ+fei+6I"');
headers.etag.should.equal('"14d3-oEuP8tEpA8HcXXDPWOOrISoZRR4"');
});

test('304s on ETag match', async () => {
await request
.get('/v1/remediations/0ecb5db7-2f1a-441b-8220-e5ce45066f50/connection_status?pretty')
.set(auth.fifi)
.set('if-none-match', '"b3f-ap0xZBE6LAEw4CWgNSPJ+fei+6I"')
.set('if-none-match', '"14d3-oEuP8tEpA8HcXXDPWOOrISoZRR4"')
.expect(304);
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/remediations/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = function (router) {
.get(openapi('checkExecutable'), rbacRead, fifi.checkExecutable);

router.route('/remediations/:id/connection_status')
.get(trace, openapi('getRemediationConnectionStatus'), rbacExecute, fifi2.connection_status);
.get(trace, openapi('getRemediationConnectionStatus'), rbacExecute, fifi.connection_status);

router.route('/remediations/:id/playbook_runs')
.get(openapi('listPlaybookRuns'), rbacRead, fifi.listPlaybookRuns)
Expand Down
Loading