debian-mirror-gitlab/spec/frontend/pipeline_new/mock_data.js

68 lines
2.1 KiB
JavaScript
Raw Normal View History

2021-04-17 20:07:23 +05:30
export const mockRefs = {
2021-06-08 01:23:25 +05:30
Branches: ['main', 'branch-1', 'branch-2'],
2021-04-17 20:07:23 +05:30
Tags: ['1.0.0', '1.1.0', '1.2.0'],
};
2021-02-22 17:27:13 +05:30
2021-04-17 20:07:23 +05:30
export const mockFilteredRefs = {
Branches: ['branch-1'],
Tags: ['1.0.0', '1.1.0'],
};
2020-10-24 23:57:45 +05:30
2021-04-17 20:07:23 +05:30
export const mockQueryParams = {
2020-10-24 23:57:45 +05:30
refParam: 'tag-1',
variableParams: {
test_var: 'test_var_val',
},
fileParams: {
test_file: 'test_file_val',
},
};
export const mockProjectId = '21';
export const mockPostParams = {
ref: 'tag-1',
2021-01-03 14:25:43 +05:30
variables_attributes: [
{ key: 'test_var', secret_value: 'test_var_val', variable_type: 'env_var' },
{ key: 'test_file', secret_value: 'test_file_val', variable_type: 'file' },
2020-10-24 23:57:45 +05:30
],
};
2020-11-24 15:15:51 +05:30
export const mockError = {
errors: [
'test job: chosen stage does not exist; available stages are .pre, build, test, deploy, .post',
],
warnings: [
'jobs:build1 may allow multiple pipelines to run for a single action due to `rules:when` clause with no `workflow:rules` - read more: https://docs.gitlab.com/ee/ci/troubleshooting.html#pipeline-warnings',
'jobs:build2 may allow multiple pipelines to run for a single action due to `rules:when` clause with no `workflow:rules` - read more: https://docs.gitlab.com/ee/ci/troubleshooting.html#pipeline-warnings',
'jobs:build3 may allow multiple pipelines to run for a single action due to `rules:when` clause with no `workflow:rules` - read more: https://docs.gitlab.com/ee/ci/troubleshooting.html#pipeline-warnings',
],
total_warnings: 7,
};
2021-02-22 17:27:13 +05:30
2021-06-08 01:23:25 +05:30
export const mockCreditCardValidationRequiredError = {
errors: ['Credit card required to be on file in order to create a pipeline'],
warnings: [],
total_warnings: 0,
};
export const mockBranchRefs = ['main', 'dev', 'release'];
2021-02-22 17:27:13 +05:30
export const mockTagRefs = ['1.0.0', '1.1.0', '1.2.0'];
2021-06-08 01:23:25 +05:30
export const mockVariables = [
{
uniqueId: 'var-refs/heads/main2',
variable_type: 'env_var',
key: 'var_without_value',
value: '',
},
{
uniqueId: 'var-refs/heads/main3',
variable_type: 'env_var',
key: 'var_with_value',
value: 'test_value',
},
{ uniqueId: 'var-refs/heads/main4', variable_type: 'env_var', key: '', value: '' },
];