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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-13 15:09:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-13 15:09:22 +0300
commit286fe61013674fe2d245ffc8d2233baf09923e70 (patch)
tree2037291f5863105e54e75be056b49f7d62007cae /spec/frontend/logs/mock_data.js
parent4cb5e5011abfe8d50ac3a7ebd0018c563c6d7af4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/logs/mock_data.js')
-rw-r--r--spec/frontend/logs/mock_data.js70
1 files changed, 19 insertions, 51 deletions
diff --git a/spec/frontend/logs/mock_data.js b/spec/frontend/logs/mock_data.js
index 4c092a84b36..1a84d6edd12 100644
--- a/spec/frontend/logs/mock_data.js
+++ b/spec/frontend/logs/mock_data.js
@@ -1,14 +1,18 @@
-export const mockProjectPath = 'root/autodevops-deploy';
+const mockProjectPath = 'root/autodevops-deploy';
+
export const mockEnvName = 'production';
export const mockEnvironmentsEndpoint = `${mockProjectPath}/environments.json`;
export const mockEnvId = '99';
export const mockDocumentationPath = '/documentation.md';
+export const mockLogsEndpoint = '/dummy_logs_path.json';
+export const mockCursor = 'MOCK_CURSOR';
+export const mockNextCursor = 'MOCK_NEXT_CURSOR';
const makeMockEnvironment = (id, name, advancedQuerying) => ({
id,
project_path: mockProjectPath,
name,
- logs_api_path: '/dummy_logs_path.json',
+ logs_api_path: mockLogsEndpoint,
enable_advanced_logs_querying: advancedQuerying,
});
@@ -28,58 +32,22 @@ export const mockPods = [
];
export const mockLogsResult = [
- {
- timestamp: '2019-12-13T13:43:18.2760123Z',
- message: '10.36.0.1 - - [16/Oct/2019:06:29:48 UTC] "GET / HTTP/1.1" 200 13',
- },
- { timestamp: '2019-12-13T13:43:18.2760123Z', message: '- -> /' },
- {
- timestamp: '2019-12-13T13:43:26.8420123Z',
- message: '10.36.0.1 - - [16/Oct/2019:06:29:57 UTC] "GET / HTTP/1.1" 200 13',
- },
- { timestamp: '2019-12-13T13:43:26.8420123Z', message: '- -> /' },
- {
- timestamp: '2019-12-13T13:43:28.3710123Z',
- message: '10.36.0.1 - - [16/Oct/2019:06:29:58 UTC] "GET / HTTP/1.1" 200 13',
- },
- { timestamp: '2019-12-13T13:43:28.3710123Z', message: '- -> /' },
- {
- timestamp: '2019-12-13T13:43:36.8860123Z',
- message: '10.36.0.1 - - [16/Oct/2019:06:30:07 UTC] "GET / HTTP/1.1" 200 13',
- },
- { timestamp: '2019-12-13T13:43:36.8860123Z', message: '- -> /' },
- {
- timestamp: '2019-12-13T13:43:38.4000123Z',
- message: '10.36.0.1 - - [16/Oct/2019:06:30:08 UTC] "GET / HTTP/1.1" 200 13',
- },
- { timestamp: '2019-12-13T13:43:38.4000123Z', message: '- -> /' },
- {
- timestamp: '2019-12-13T13:43:46.8420123Z',
- message: '10.36.0.1 - - [16/Oct/2019:06:30:17 UTC] "GET / HTTP/1.1" 200 13',
- },
- { timestamp: '2019-12-13T13:43:46.8430123Z', message: '- -> /' },
- {
- timestamp: '2019-12-13T13:43:48.3240123Z',
- message: '10.36.0.1 - - [16/Oct/2019:06:30:18 UTC] "GET / HTTP/1.1" 200 13',
- },
- { timestamp: '2019-12-13T13:43:48.3250123Z', message: '- -> /' },
+ { timestamp: '2019-12-13T13:43:18.2760123Z', message: 'Log 1' },
+ { timestamp: '2019-12-13T13:43:18.2760123Z', message: 'Log 2' },
+ { timestamp: '2019-12-13T13:43:26.8420123Z', message: 'Log 3' },
];
export const mockTrace = [
- 'Dec 13 13:43:18.276Z | 10.36.0.1 - - [16/Oct/2019:06:29:48 UTC] "GET / HTTP/1.1" 200 13',
- 'Dec 13 13:43:18.276Z | - -> /',
- 'Dec 13 13:43:26.842Z | 10.36.0.1 - - [16/Oct/2019:06:29:57 UTC] "GET / HTTP/1.1" 200 13',
- 'Dec 13 13:43:26.842Z | - -> /',
- 'Dec 13 13:43:28.371Z | 10.36.0.1 - - [16/Oct/2019:06:29:58 UTC] "GET / HTTP/1.1" 200 13',
- 'Dec 13 13:43:28.371Z | - -> /',
- 'Dec 13 13:43:36.886Z | 10.36.0.1 - - [16/Oct/2019:06:30:07 UTC] "GET / HTTP/1.1" 200 13',
- 'Dec 13 13:43:36.886Z | - -> /',
- 'Dec 13 13:43:38.400Z | 10.36.0.1 - - [16/Oct/2019:06:30:08 UTC] "GET / HTTP/1.1" 200 13',
- 'Dec 13 13:43:38.400Z | - -> /',
- 'Dec 13 13:43:46.842Z | 10.36.0.1 - - [16/Oct/2019:06:30:17 UTC] "GET / HTTP/1.1" 200 13',
- 'Dec 13 13:43:46.843Z | - -> /',
- 'Dec 13 13:43:48.324Z | 10.36.0.1 - - [16/Oct/2019:06:30:18 UTC] "GET / HTTP/1.1" 200 13',
- 'Dec 13 13:43:48.325Z | - -> /',
+ 'Dec 13 13:43:18.276Z | Log 1',
+ 'Dec 13 13:43:18.276Z | Log 2',
+ 'Dec 13 13:43:26.842Z | Log 3',
];
+export const mockResponse = {
+ pod_name: mockPodName,
+ pods: mockPods,
+ logs: mockLogsResult,
+ cursor: mockNextCursor,
+};
+
export const mockSearch = 'foo +bar';