refactor(api): streamline mikrotik-install script and enhance synchronization logic
- Consolidated the `mikrotik-install.rsc` script to utilize a single `evofw-sync` script for improved clarity and efficiency in synchronization processes. - Removed the legacy `evofw-env` script, simplifying the token management and ensuring a more reliable update mechanism. - Updated the token generation logic to enhance security and reliability, while ensuring compatibility with RouterOS 7+. - Adjusted test assertions in `install-links.test.ts` to verify the presence of new script components and ensure accurate testing of the installation logic. These changes improve the overall robustness and maintainability of the agent installation and synchronization process.
This commit is contained in:
@@ -143,6 +143,8 @@ describe('install-links', () => {
|
||||
expect(byId.body).toContain('evofw-deny-drop-input')
|
||||
expect(byId.body).toContain('/v1/agent/policy')
|
||||
expect(byId.body).toContain(':deserialize')
|
||||
expect(byId.body).toContain('evofw-sync-body')
|
||||
expect(byId.body).toContain('remove [find name="evofw-env"]')
|
||||
})
|
||||
|
||||
it('approved agent can fetch empty policy without rule sets', async () => {
|
||||
|
||||
Reference in New Issue
Block a user