summaryrefslogtreecommitdiff
path: root/spec/frontend/import/details/mock_data.js
blob: a8e0e53ed2b834e3eb281a2b8e5622168cf6241b (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
48
49
50
51
52
53
export const mockImportFailures = [
  {
    type: 'pull_request',
    title: 'Add one cool feature',
    url: 'https://github.com/USER/REPO/pull/2',
    details: {
      exception_class: 'ActiveRecord::RecordInvalid',
      exception_message: 'Record invalid',
      source: 'Gitlab::GithubImport::Importer::PullRequestImporter',
      github_identifiers: {
        iid: 2,
        issuable_type: 'MergeRequest',
        object_type: 'pull_request',
      },
    },
  },
  {
    type: 'pull_request',
    title: 'Add another awesome feature',
    url: 'https://github.com/USER/REPO/pull/3',
    details: {
      exception_class: 'ActiveRecord::RecordInvalid',
      exception_message: 'Record invalid',
      source: 'Gitlab::GithubImport::Importer::PullRequestImporter',
      github_identifiers: {
        iid: 3,
        issuable_type: 'MergeRequest',
        object_type: 'pull_request',
      },
    },
  },
  {
    type: 'lfs_object',
    title: '3a9257fae9e86faee27d7208cb55e086f18e6f29f48c430bfbc26d42eb',
    url: null,
    details: {
      exception_class: 'NameError',
      exception_message: 'some message',
      source: 'Gitlab::GithubImport::Importer::LfsObjectImporter',
      github_identifiers: {
        oid: '3a9257fae9e86faee27d7208cb55e086f18e6f29f48c430bfbc26d42eb',
        size: 2473979,
      },
    },
  },
];

export const mockHeaders = {
  'x-page': 1,
  'x-per-page': 20,
  'x-total': 3,
  'x-total-pages': 1,
};