mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
chore(kompose): remove from settings [EE-4741] (#8375)
This commit is contained in:
parent
00bbf4ac63
commit
5640cce4d6
25 changed files with 237 additions and 238 deletions
40
app/react/edge/edge-stacks/utils.test.ts
Normal file
40
app/react/edge/edge-stacks/utils.test.ts
Normal file
|
@ -0,0 +1,40 @@
|
|||
import { EnvironmentType } from '@/react/portainer/environments/types';
|
||||
|
||||
import { EditorType } from './types';
|
||||
import { getValidEditorTypes } from './utils';
|
||||
|
||||
interface GetValidEditorTypesTest {
|
||||
endpointTypes: EnvironmentType[];
|
||||
expected: EditorType[];
|
||||
title: string;
|
||||
}
|
||||
|
||||
describe('getValidEditorTypes', () => {
|
||||
const tests: GetValidEditorTypesTest[] = [
|
||||
{
|
||||
endpointTypes: [EnvironmentType.EdgeAgentOnDocker],
|
||||
expected: [EditorType.Compose],
|
||||
title: 'should return compose for docker envs',
|
||||
},
|
||||
{
|
||||
endpointTypes: [EnvironmentType.EdgeAgentOnKubernetes],
|
||||
expected: [EditorType.Kubernetes],
|
||||
title: 'should return kubernetes for kubernetes envs',
|
||||
},
|
||||
{
|
||||
endpointTypes: [
|
||||
EnvironmentType.EdgeAgentOnDocker,
|
||||
EnvironmentType.EdgeAgentOnKubernetes,
|
||||
],
|
||||
expected: [],
|
||||
title: 'should return empty for docker and kubernetes envs',
|
||||
},
|
||||
];
|
||||
|
||||
tests.forEach((test) => {
|
||||
// eslint-disable-next-line jest/valid-title
|
||||
it(test.title, () => {
|
||||
expect(getValidEditorTypes(test.endpointTypes)).toEqual(test.expected);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue