debian-mirror-gitlab/spec/frontend/registry/settings/mock_data.js
2021-03-08 18:12:59 +05:30

40 lines
860 B
JavaScript

export const containerExpirationPolicyData = () => ({
cadence: 'EVERY_DAY',
enabled: true,
keepN: 'TEN_TAGS',
nameRegex: 'asdasdssssdfdf',
nameRegexKeep: 'sss',
olderThan: 'FOURTEEN_DAYS',
nextRunAt: '2020-11-19T07:37:03.941Z',
});
export const expirationPolicyPayload = (override) => ({
data: {
project: {
containerExpirationPolicy: {
...containerExpirationPolicyData(),
...override,
},
},
},
});
export const emptyExpirationPolicyPayload = () => ({
data: {
project: {
containerExpirationPolicy: {},
},
},
});
export const expirationPolicyMutationPayload = ({ override, errors = [] } = {}) => ({
data: {
updateContainerExpirationPolicy: {
containerExpirationPolicy: {
...containerExpirationPolicyData(),
...override,
},
errors,
},
},
});