Commit b66b12b8 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'dz-fix-environments-logs' into 'master'

Fix environment containers logs

See merge request gitlab-org/gitlab!21205
parents 2a556cb7 6e19be45
......@@ -11,11 +11,11 @@ export default {
groupEpicsPath:
'/api/:version/groups/:id/epics?include_ancestor_groups=:includeAncestorGroups&include_descendant_groups=:includeDescendantGroups',
epicIssuePath: '/api/:version/groups/:id/epics/:epic_iid/issues/:issue_id',
podLogsPath: '/:project_full_path/environments/:environment_id/pods/containers/logs.json',
podLogsPath: '/:project_full_path/-/environments/:environment_id/pods/containers/logs.json',
podLogsPathWithPod:
'/:project_full_path/environments/:environment_id/pods/:pod_name/containers/logs.json',
'/:project_full_path/-/environments/:environment_id/pods/:pod_name/containers/logs.json',
podLogsPathWithPodContainer:
'/:project_full_path/environments/:environment_id/pods/:pod_name/containers/:container_name/logs.json',
'/:project_full_path/-/environments/:environment_id/pods/:pod_name/containers/:container_name/logs.json',
groupPackagesPath: '/api/:version/groups/:id/packages',
projectPackagesPath: '/api/:version/projects/:id/packages',
projectPackagePath: '/api/:version/projects/:id/packages/:package_id',
......
......@@ -181,7 +181,7 @@ describe('Api', () => {
});
it('calls `axios.get` with pod_name and container_name', done => {
const expectedUrl = `${dummyUrlRoot}/${projectPath}/environments/${environmentId}/pods/${podName}/containers/${containerName}/logs.json`;
const expectedUrl = `${dummyUrlRoot}/${projectPath}/-/environments/${environmentId}/pods/${podName}/containers/${containerName}/logs.json`;
Api.getPodLogs({ projectPath, environmentId, podName, containerName })
.then(() => {
......@@ -192,7 +192,7 @@ describe('Api', () => {
});
it('calls `axios.get` without pod_name and container_name', done => {
const expectedUrl = `${dummyUrlRoot}/${projectPath}/environments/${environmentId}/pods/containers/logs.json`;
const expectedUrl = `${dummyUrlRoot}/${projectPath}/-/environments/${environmentId}/pods/containers/logs.json`;
Api.getPodLogs({ projectPath, environmentId })
.then(() => {
......@@ -203,7 +203,7 @@ describe('Api', () => {
});
it('calls `axios.get` with pod_name', done => {
const expectedUrl = `${dummyUrlRoot}/${projectPath}/environments/${environmentId}/pods/${podName}/containers/logs.json`;
const expectedUrl = `${dummyUrlRoot}/${projectPath}/-/environments/${environmentId}/pods/${podName}/containers/logs.json`;
Api.getPodLogs({ projectPath, environmentId, podName })
.then(() => {
......
......@@ -117,7 +117,7 @@ describe('Logs Store actions', () => {
state.environments.current = mockEnvId;
state.pods.current = mockPodName;
const endpoint = `/${mockProjectPath}/environments/${mockEnvId}/pods/${mockPodName}/containers/logs.json`;
const endpoint = `/${mockProjectPath}/-/environments/${mockEnvId}/pods/${mockPodName}/containers/logs.json`;
mock.onGet(endpoint).reply(200, {
pod_name: mockPodName,
......@@ -147,7 +147,7 @@ describe('Logs Store actions', () => {
state.projectPath = mockProjectPath;
state.environments.current = mockEnvId;
const endpoint = `/${mockProjectPath}/environments/${mockEnvId}/pods/containers/logs.json`;
const endpoint = `/${mockProjectPath}/-/environments/${mockEnvId}/pods/containers/logs.json`;
mock.onGet(endpoint).reply(200, {
pod_name: mockPodName,
......@@ -176,7 +176,7 @@ describe('Logs Store actions', () => {
state.projectPath = mockProjectPath;
state.environments.current = mockEnvId;
const endpoint = `/${mockProjectPath}/environments/${mockEnvId}/pods/containers/logs.json`;
const endpoint = `/${mockProjectPath}/-/environments/${mockEnvId}/pods/containers/logs.json`;
mock.onGet(endpoint).replyOnce(500);
testAction(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment