forked from janus-idp/backstage-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(kiali): remove IstioConfig extra, Fix links and add kiali control (…
…janus-idp#1452) * fix(kiali): remove IstioConfig extra, Fix links and add kiali control * Fix links in details views * Add initial tests --------- Co-authored-by: Alberto Gutierrez <aljesusg>
- Loading branch information
Showing
36 changed files
with
831 additions
and
484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
plugins/kiali-backend/src/clients/KialiAPIConnector.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { createLogger, transports } from 'winston'; | ||
|
||
import supported from '../kiali_supported.json'; | ||
import { KIALI_CORE_VERSION, KialiApiImpl } from './KialiAPIConnector'; | ||
|
||
const logger = createLogger({ | ||
transports: [new transports.Console({ silent: true })], | ||
}); | ||
|
||
const kialiApi = new KialiApiImpl({ | ||
logger: logger, | ||
kiali: { url: 'https://localhost:4000' }, | ||
}); | ||
|
||
describe('kiali Api Connector', () => { | ||
describe('Validate suported version', () => { | ||
it('Plugin support the version', () => { | ||
const versionsToTest = ['v1.73', 'v1.73.6']; | ||
versionsToTest.forEach(version => { | ||
const support = kialiApi.supportedVersion(version); | ||
expect(support).toBeUndefined(); | ||
}); | ||
}); | ||
|
||
it('Plugin not support version', () => { | ||
const versionToTest = 'v1.70'; | ||
const support = kialiApi.supportedVersion(versionToTest); | ||
const kialiSupported = supported[KIALI_CORE_VERSION]; | ||
expect(support).toBe( | ||
`Kiali version supported is ${kialiSupported}, we found version ${versionToTest}`, | ||
); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"Kiali version": "v1.73" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.