mirror of
https://github.com/portainer/portainer.git
synced 2026-06-23 06:30:14 +00:00
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import _ from 'lodash';
|
|
|
|
import { defaultValues } from '@/react/portainer/access-control/utils';
|
|
import { DeepPartial } from '@/types';
|
|
|
|
import { FormValues } from './types';
|
|
|
|
export function mockFormValues(overrides: DeepPartial<FormValues>): FormValues {
|
|
return _.merge(
|
|
{
|
|
method: 'editor',
|
|
name: 'test-stack',
|
|
env: [],
|
|
accessControl: defaultValues(false, 1),
|
|
enableWebhook: false,
|
|
registries: [],
|
|
editor: {
|
|
fileContent: '',
|
|
},
|
|
upload: {
|
|
file: null,
|
|
},
|
|
git: {
|
|
RepositoryURL: '',
|
|
RepositoryReferenceName: '',
|
|
ComposeFilePathInRepository: '',
|
|
RepositoryAuthentication: false,
|
|
RepositoryUsername: '',
|
|
RepositoryPassword: '',
|
|
TLSSkipVerify: false,
|
|
AdditionalFiles: [],
|
|
AutoUpdate: undefined,
|
|
RepositoryAuthorizationType: undefined,
|
|
SupportRelativePath: false,
|
|
FilesystemPath: '',
|
|
},
|
|
template: {
|
|
selectedId: undefined,
|
|
variables: [],
|
|
fileContent: '',
|
|
},
|
|
},
|
|
overrides
|
|
);
|
|
}
|