debian-mirror-gitlab/spec/frontend/registry/settings/mock_data.js
2021-01-03 14:25:43 +05:30

40 lines
889 B
JavaScript

export const expirationPolicyPayload = override => ({
data: {
project: {
containerExpirationPolicy: {
cadence: 'EVERY_DAY',
enabled: true,
keepN: 'TEN_TAGS',
nameRegex: 'asdasdssssdfdf',
nameRegexKeep: 'sss',
olderThan: 'FOURTEEN_DAYS',
...override,
},
},
},
});
export const emptyExpirationPolicyPayload = () => ({
data: {
project: {
containerExpirationPolicy: {},
},
},
});
export const expirationPolicyMutationPayload = ({ override, errors = [] } = {}) => ({
data: {
updateContainerExpirationPolicy: {
containerExpirationPolicy: {
cadence: 'EVERY_DAY',
enabled: true,
keepN: 'TEN_TAGS',
nameRegex: 'asdasdssssdfdf',
nameRegexKeep: 'sss',
olderThan: 'FOURTEEN_DAYS',
...override,
},
errors,
},
},
});