summaryrefslogtreecommitdiff
path: root/spec/frontend/pipeline_new/mock_data.js
blob: feb24ec602dad1fba57fb8ec729d402c47674222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
export const mockBranches = [
  { shortName: 'master', fullName: 'refs/heads/master' },
  { shortName: 'branch-1', fullName: 'refs/heads/branch-1' },
  { shortName: 'branch-2', fullName: 'refs/heads/branch-2' },
];

export const mockTags = [
  { shortName: '1.0.0', fullName: 'refs/tags/1.0.0' },
  { shortName: '1.1.0', fullName: 'refs/tags/1.1.0' },
  { shortName: '1.2.0', fullName: 'refs/tags/1.2.0' },
];

export const mockParams = {
  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',
  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' },
  ],
};

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,
};

export const mockBranchRefs = ['master', 'dev', 'release'];

export const mockTagRefs = ['1.0.0', '1.1.0', '1.2.0'];