Welcome to mirror list, hosted at ThFree Co, Russian Federation.

get_list_project_pipelines.fixture.js « pipeline « project « fixtures « consumer « contracts « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8a7663325b98904820f3831649fcbd995bcee856 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
/* eslint-disable @gitlab/require-i18n-strings */

import { Matchers } from '@pact-foundation/pact';
import {
  URL,
  URL_PATH,
  PIPELINE_GROUPS,
  PIPELINE_LABELS,
  PIPELINE_SOURCES,
  PIPELINE_STATUSES,
  PIPELINE_TEXTS,
  USER_STATES,
} from '../../../helpers/common_regex_patterns';

const body = {
  pipelines: Matchers.eachLike({
    id: Matchers.integer(564173401),
    iid: Matchers.integer(8197225),
    user: {
      id: Matchers.integer(1781152),
      username: Matchers.string('gitlab-bot'),
      name: Matchers.string('🤖 GitLab Bot 🤖'),
      state: Matchers.term({
        matcher: USER_STATES,
        generate: 'active',
      }),
      avatar_url: Matchers.term({
        matcher: URL,
        generate: 'https://gitlab.com/uploads/-/system/user/avatar/1516152/avatar.png',
      }),
      web_url: Matchers.term({
        matcher: URL,
        generate: 'https://gitlab.com/gitlab-bot',
      }),
      show_status: Matchers.boolean(false),
      path: Matchers.term({
        matcher: URL_PATH,
        generate: '/gitlab-bot',
      }),
    },
    active: Matchers.boolean(true),
    source: Matchers.term({
      matcher: PIPELINE_SOURCES,
      generate: 'schedule',
    }),
    created_at: Matchers.iso8601DateTimeWithMillis('2022-06-11T00:05:21.558Z'),
    updated_at: Matchers.iso8601DateTimeWithMillis('2022-06-11T00:05:34.258Z'),
    path: Matchers.term({
      matcher: URL_PATH,
      generate: '/gitlab-org/gitlab/-/pipelines/561224401',
    }),
    flags: {
      stuck: Matchers.boolean(false),
      auto_devops: Matchers.boolean(false),
      merge_request: Matchers.boolean(false),
      yaml_errors: Matchers.boolean(false),
      retryable: Matchers.boolean(false),
      cancelable: Matchers.boolean(false),
      failure_reason: Matchers.boolean(false),
      detached_merge_request_pipeline: Matchers.boolean(false),
      merge_request_pipeline: Matchers.boolean(false),
      merge_train_pipeline: Matchers.boolean(false),
      latest: Matchers.boolean(true),
    },
    details: {
      status: {
        icon: Matchers.term({
          matcher: PIPELINE_STATUSES,
          generate: 'status_running',
        }),
        text: Matchers.term({
          matcher: PIPELINE_TEXTS,
          generate: 'running',
        }),
        label: Matchers.term({
          matcher: PIPELINE_LABELS,
          generate: 'running',
        }),
        group: Matchers.term({
          matcher: PIPELINE_GROUPS,
          generate: 'running',
        }),
        tooltip: Matchers.term({
          matcher: PIPELINE_LABELS,
          generate: 'passed',
        }),
        has_details: Matchers.boolean(true),
        details_path: Matchers.term({
          matcher: URL_PATH,
          generate: '/gitlab-org/gitlab/-/pipelines/566374401',
        }),
        illustration: null,
        favicon: Matchers.term({
          matcher: URL_PATH,
          generate: '/assets/ci_favicons/favicon_status_running.png',
        }),
      },
      stages: Matchers.eachLike({
        name: Matchers.string('sync'),
        title: Matchers.string('sync: passed'),
        status: {
          icon: Matchers.term({
            matcher: PIPELINE_STATUSES,
            generate: 'status_success',
          }),
          text: Matchers.term({
            matcher: PIPELINE_TEXTS,
            generate: 'passed',
          }),
          label: Matchers.term({
            matcher: PIPELINE_LABELS,
            generate: 'passed',
          }),
          group: Matchers.term({
            matcher: PIPELINE_GROUPS,
            generate: 'success',
          }),
          tooltip: Matchers.term({
            matcher: PIPELINE_LABELS,
            generate: 'passed',
          }),
          has_details: Matchers.boolean(true),
          details_path: Matchers.term({
            matcher: URL_PATH,
            generate: '/gitlab-org/gitlab/-/pipelines/561174401#sync',
          }),
          illustration: null,
          favicon: Matchers.term({
            matcher: URL_PATH,
            generate: '/assets/ci_favicons/favicon_status_success.png',
          }),
        },
        path: Matchers.term({
          matcher: URL_PATH,
          generate: '/gitlab-org/gitlab/-/pipelines/561124401#sync',
        }),
        dropdown_path: Matchers.term({
          matcher: URL_PATH,
          generate: '/gitlab-org/gitlab/-/pipelines/561174401/stage.json?stage=sync',
        }),
      }),
      duration: Matchers.integer(25),
      finished_at: Matchers.iso8601DateTimeWithMillis('2022-06-11T00:55:21.558Z'),
      name: Matchers.string('Pipeline'),
      manual_actions: Matchers.eachLike({
        name: Matchers.string('review-docs-deploy'),
        playable: Matchers.boolean(true),
        scheduled: Matchers.boolean(false),
      }),
      scheduled_actions: Matchers.eachLike({
        name: Matchers.string('review-docs-schedule'),
        playable: Matchers.boolean(true),
        scheduled: Matchers.boolean(false),
      }),
    },
    ref: {
      name: Matchers.string('master'),
      path: Matchers.term({
        matcher: URL_PATH,
        generate: '/gitlab-org/gitlab/-/commits/master',
      }),
      tag: Matchers.boolean(false),
      branch: Matchers.boolean(true),
      merge_request: Matchers.boolean(false),
    },
    commit: {
      id: Matchers.string('e6d797385144b955c6d4ecfa00e9656dc33efd2b'),
      short_id: Matchers.string('e6d79738'),
      created_at: Matchers.iso8601DateTimeWithMillis('2022-06-10T22:02:10.000+00:00'),
      parent_ids: Matchers.eachLike(Matchers.string('3b0e053a24958174eaa7e3b183c7263432890d1c')),
      title: Matchers.string("Merge branch 'ee-test' into 'master'"),
      message: Matchers.string("Merge branch 'ee-test' into 'master'\nThis is a test."),
      author_name: Matchers.string('John Doe'),
      author_email: Matchers.email('jdoe@gitlab.com'),
      authored_date: Matchers.iso8601DateTimeWithMillis('2022-06-10T22:02:10.000+00:00'),
      committer_name: Matchers.string('John Doe'),
      committer_email: Matchers.email('jdoe@gitlab.com'),
      committed_date: Matchers.iso8601DateTimeWithMillis('2022-06-10T22:02:10.000+00:00'),
      trailers: {},
      web_url: Matchers.term({
        matcher: URL,
        generate: 'https://gitlab.com/gitlab-org/gitlab/-/commit/f559253c514d9ab707c66e',
      }),
      author: null,
      author_gravatar_url: Matchers.term({
        matcher: URL,
        generate:
          'https://secure.gravatar.com/avatar/d85e45af29611ac2c1395e3c3d6ec5d6?s=80\u0026d=identicon',
      }),
      commit_url: Matchers.term({
        matcher: URL,
        generate:
          'https://gitlab.com/gitlab-org/gitlab/-/commit/dc7522f559253c514d9ab707c66e7a1026abca5a',
      }),
      commit_path: Matchers.term({
        matcher: URL_PATH,
        generate: '/gitlab-org/gitlab/-/commit/dc7522f559253c514d9ab707c66e7a1026abca5a',
      }),
    },
    project: {
      id: Matchers.integer(253964),
      name: Matchers.string('GitLab'),
      full_path: Matchers.term({
        matcher: URL_PATH,
        generate: '/gitlab-org/gitlab',
      }),
      full_name: Matchers.string('GitLab.org / GitLab'),
    },
    triggered_by: null,
    triggered: [],
  }),
  count: {
    all: Matchers.string('1,000+'),
  },
};

const ProjectPipelines = {
  body: Matchers.extractPayload(body),

  success: {
    status: 200,
    headers: {
      'Content-Type': 'application/json; charset=utf-8',
    },
    body,
  },

  request: {
    uponReceiving: 'a request for a list of project pipelines',
    withRequest: {
      method: 'GET',
      path: '/gitlab-org/gitlab-qa/-/pipelines.json',
      headers: {
        Accept: '*/*',
      },
      query: 'scope=all&page=1',
    },
  },
};

export { ProjectPipelines };

/* eslint-enable @gitlab/require-i18n-strings */