2021-02-22 17:27:13 +05:30
|
|
|
export const imagesListResponse = [
|
2020-03-13 15:44:24 +05:30
|
|
|
{
|
2021-02-22 17:27:13 +05:30
|
|
|
__typename: 'ContainerRepository',
|
|
|
|
id: 'gid://gitlab/ContainerRepository/26',
|
|
|
|
name: 'rails-12009',
|
|
|
|
path: 'gitlab-org/gitlab-test/rails-12009',
|
|
|
|
status: null,
|
|
|
|
location: '0.0.0.0:5000/gitlab-org/gitlab-test/rails-12009',
|
|
|
|
canDelete: true,
|
|
|
|
createdAt: '2020-11-03T13:29:21Z',
|
|
|
|
expirationPolicyStartedAt: null,
|
2020-03-13 15:44:24 +05:30
|
|
|
},
|
|
|
|
{
|
2021-02-22 17:27:13 +05:30
|
|
|
__typename: 'ContainerRepository',
|
|
|
|
id: 'gid://gitlab/ContainerRepository/11',
|
|
|
|
name: 'rails-20572',
|
|
|
|
path: 'gitlab-org/gitlab-test/rails-20572',
|
|
|
|
status: null,
|
|
|
|
location: '0.0.0.0:5000/gitlab-org/gitlab-test/rails-20572',
|
|
|
|
canDelete: true,
|
|
|
|
createdAt: '2020-09-21T06:57:43Z',
|
|
|
|
expirationPolicyStartedAt: null,
|
2020-03-13 15:44:24 +05:30
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2021-02-22 17:27:13 +05:30
|
|
|
export const pageInfo = {
|
|
|
|
hasNextPage: true,
|
|
|
|
hasPreviousPage: true,
|
|
|
|
startCursor: 'eyJpZCI6IjI2In0',
|
|
|
|
endCursor: 'eyJpZCI6IjgifQ',
|
|
|
|
__typename: 'ContainerRepositoryConnection',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const graphQLImageListMock = {
|
|
|
|
data: {
|
|
|
|
project: {
|
|
|
|
__typename: 'Project',
|
|
|
|
containerRepositoriesCount: 2,
|
|
|
|
containerRepositories: {
|
|
|
|
__typename: 'ContainerRepositoryConnection',
|
|
|
|
nodes: imagesListResponse,
|
|
|
|
pageInfo,
|
|
|
|
},
|
|
|
|
},
|
2020-03-13 15:44:24 +05:30
|
|
|
},
|
2021-02-22 17:27:13 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
export const graphQLEmptyImageListMock = {
|
|
|
|
data: {
|
|
|
|
project: {
|
|
|
|
__typename: 'Project',
|
|
|
|
containerRepositoriesCount: 2,
|
|
|
|
containerRepositories: {
|
|
|
|
__typename: 'ContainerRepositoryConnection',
|
|
|
|
nodes: [],
|
|
|
|
pageInfo,
|
|
|
|
},
|
|
|
|
},
|
2020-03-13 15:44:24 +05:30
|
|
|
},
|
2021-02-22 17:27:13 +05:30
|
|
|
};
|
2020-03-13 15:44:24 +05:30
|
|
|
|
2021-02-22 17:27:13 +05:30
|
|
|
export const graphQLEmptyGroupImageListMock = {
|
|
|
|
data: {
|
|
|
|
group: {
|
|
|
|
__typename: 'Group',
|
|
|
|
containerRepositoriesCount: 2,
|
|
|
|
containerRepositories: {
|
|
|
|
__typename: 'ContainerRepositoryConnection',
|
|
|
|
nodes: [],
|
|
|
|
pageInfo,
|
|
|
|
},
|
2020-03-13 15:44:24 +05:30
|
|
|
},
|
2021-02-22 17:27:13 +05:30
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const deletedContainerRepository = {
|
|
|
|
id: 'gid://gitlab/ContainerRepository/11',
|
|
|
|
status: 'DELETE_SCHEDULED',
|
|
|
|
path: 'gitlab-org/gitlab-test/rails-12009',
|
|
|
|
__typename: 'ContainerRepository',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const graphQLImageDeleteMock = {
|
|
|
|
data: {
|
|
|
|
destroyContainerRepository: {
|
|
|
|
containerRepository: {
|
|
|
|
...deletedContainerRepository,
|
|
|
|
},
|
|
|
|
errors: [],
|
|
|
|
__typename: 'DestroyContainerRepositoryPayload',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const graphQLImageDeleteMockError = {
|
|
|
|
data: {
|
|
|
|
destroyContainerRepository: {
|
|
|
|
containerRepository: {
|
|
|
|
...deletedContainerRepository,
|
|
|
|
},
|
|
|
|
errors: ['foo'],
|
|
|
|
__typename: 'DestroyContainerRepositoryPayload',
|
2020-03-13 15:44:24 +05:30
|
|
|
},
|
2021-02-22 17:27:13 +05:30
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const containerRepositoryMock = {
|
|
|
|
id: 'gid://gitlab/ContainerRepository/26',
|
|
|
|
name: 'rails-12009',
|
|
|
|
path: 'gitlab-org/gitlab-test/rails-12009',
|
|
|
|
status: null,
|
|
|
|
location: 'host.docker.internal:5000/gitlab-org/gitlab-test/rails-12009',
|
|
|
|
canDelete: true,
|
|
|
|
createdAt: '2020-11-03T13:29:21Z',
|
|
|
|
updatedAt: '2020-11-03T13:29:21Z',
|
|
|
|
tagsCount: 13,
|
|
|
|
expirationPolicyStartedAt: null,
|
2021-03-08 18:12:59 +05:30
|
|
|
expirationPolicyCleanupStatus: 'UNSCHEDULED',
|
2021-02-22 17:27:13 +05:30
|
|
|
project: {
|
|
|
|
visibility: 'public',
|
2021-03-08 18:12:59 +05:30
|
|
|
containerExpirationPolicy: {
|
|
|
|
enabled: false,
|
|
|
|
nextRunAt: '2020-11-27T08:59:27Z',
|
|
|
|
},
|
2021-02-22 17:27:13 +05:30
|
|
|
__typename: 'Project',
|
|
|
|
},
|
2020-03-13 15:44:24 +05:30
|
|
|
};
|
|
|
|
|
2021-02-22 17:27:13 +05:30
|
|
|
export const tagsPageInfo = {
|
|
|
|
__typename: 'PageInfo',
|
|
|
|
hasNextPage: true,
|
|
|
|
hasPreviousPage: true,
|
|
|
|
startCursor: 'MQ',
|
|
|
|
endCursor: 'MTA',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const tagsMock = [
|
|
|
|
{
|
|
|
|
digest: 'sha256:2cf3d2fdac1b04a14301d47d51cb88dcd26714c74f91440eeee99ce399089062',
|
|
|
|
location: 'host.docker.internal:5000/gitlab-org/gitlab-test/rails-12009:beta-24753',
|
|
|
|
path: 'gitlab-org/gitlab-test/rails-12009:beta-24753',
|
|
|
|
name: 'beta-24753',
|
|
|
|
revision: 'c2613843ab33aabf847965442b13a8b55a56ae28837ce182627c0716eb08c02b',
|
|
|
|
shortRevision: 'c2613843a',
|
|
|
|
createdAt: '2020-11-03T13:29:38+00:00',
|
|
|
|
totalSize: '1099511627776',
|
|
|
|
canDelete: true,
|
|
|
|
__typename: 'ContainerRepositoryTag',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
digest: 'sha256:7f94f97dff89ffd122cafe50cd32329adf682356a7a96f69cbfe313ee589791c',
|
|
|
|
location: 'host.docker.internal:5000/gitlab-org/gitlab-test/rails-12009:beta-31075',
|
|
|
|
path: 'gitlab-org/gitlab-test/rails-12009:beta-31075',
|
|
|
|
name: 'beta-31075',
|
|
|
|
revision: 'df44e7228f0f255c73e35b6f0699624a615f42746e3e8e2e4b3804a6d6fc3292',
|
|
|
|
shortRevision: 'df44e7228',
|
|
|
|
createdAt: '2020-11-03T13:29:32+00:00',
|
|
|
|
totalSize: '536870912000',
|
|
|
|
canDelete: true,
|
|
|
|
__typename: 'ContainerRepositoryTag',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2021-03-08 18:12:59 +05:30
|
|
|
export const graphQLImageDetailsMock = (override) => ({
|
2021-02-22 17:27:13 +05:30
|
|
|
data: {
|
|
|
|
containerRepository: {
|
|
|
|
...containerRepositoryMock,
|
|
|
|
|
|
|
|
tags: {
|
|
|
|
nodes: tagsMock,
|
|
|
|
pageInfo: { ...tagsPageInfo },
|
|
|
|
__typename: 'ContainerRepositoryTagConnection',
|
|
|
|
},
|
|
|
|
__typename: 'ContainerRepositoryDetails',
|
|
|
|
...override,
|
2020-03-13 15:44:24 +05:30
|
|
|
},
|
2021-02-22 17:27:13 +05:30
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export const graphQLImageDetailsEmptyTagsMock = {
|
|
|
|
data: {
|
|
|
|
containerRepository: {
|
|
|
|
...containerRepositoryMock,
|
|
|
|
tags: {
|
|
|
|
nodes: [],
|
|
|
|
pageInfo: {
|
|
|
|
__typename: 'PageInfo',
|
|
|
|
hasNextPage: false,
|
|
|
|
hasPreviousPage: false,
|
|
|
|
startCursor: '',
|
|
|
|
endCursor: '',
|
|
|
|
},
|
|
|
|
__typename: 'ContainerRepositoryTagConnection',
|
|
|
|
},
|
|
|
|
__typename: 'ContainerRepositoryDetails',
|
2020-03-13 15:44:24 +05:30
|
|
|
},
|
2021-02-22 17:27:13 +05:30
|
|
|
},
|
2020-03-13 15:44:24 +05:30
|
|
|
};
|
2020-05-24 23:13:21 +05:30
|
|
|
|
2021-02-22 17:27:13 +05:30
|
|
|
export const graphQLDeleteImageRepositoryTagsMock = {
|
|
|
|
data: {
|
|
|
|
destroyContainerRepositoryTags: {
|
|
|
|
deletedTagNames: [],
|
|
|
|
errors: [],
|
|
|
|
__typename: 'DestroyContainerRepositoryTagsPayload',
|
|
|
|
},
|
|
|
|
},
|
2020-05-24 23:13:21 +05:30
|
|
|
};
|
2021-01-29 00:20:46 +05:30
|
|
|
|
2021-02-22 17:27:13 +05:30
|
|
|
export const dockerCommands = {
|
|
|
|
dockerBuildCommand: 'foofoo',
|
|
|
|
dockerPushCommand: 'barbar',
|
|
|
|
dockerLoginCommand: 'bazbaz',
|
2021-01-29 00:20:46 +05:30
|
|
|
};
|
2021-03-08 18:12:59 +05:30
|
|
|
|
|
|
|
export const graphQLProjectImageRepositoriesDetailsMock = {
|
|
|
|
data: {
|
|
|
|
project: {
|
|
|
|
containerRepositories: {
|
|
|
|
nodes: [
|
|
|
|
{
|
|
|
|
id: 'gid://gitlab/ContainerRepository/26',
|
|
|
|
tagsCount: 4,
|
|
|
|
__typename: 'ContainerRepository',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'gid://gitlab/ContainerRepository/11',
|
|
|
|
tagsCount: 1,
|
|
|
|
__typename: 'ContainerRepository',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
__typename: 'ContainerRepositoryConnection',
|
|
|
|
},
|
|
|
|
__typename: 'Project',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2021-03-11 19:13:27 +05:30
|
|
|
|
|
|
|
export const graphQLEmptyImageDetailsMock = {
|
|
|
|
data: {
|
|
|
|
containerRepository: null,
|
|
|
|
},
|
|
|
|
};
|