Skip to content

Commit 3c9cecf

Browse files
committed
Add ftest for google calendar
1 parent 8a4477c commit 3c9cecf

7 files changed

Lines changed: 484 additions & 0 deletions

File tree

.buildkite/nightly_steps.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,3 +349,15 @@ steps:
349349
matrix:
350350
- "3.10"
351351
- "3.11"
352+
- label: "🔨 [Python {{ matrix }}] Google Calendar"
353+
<<: *retries
354+
command: ".buildkite/run_functional_test.sh"
355+
env:
356+
PYTHON_VERSION: "{{ matrix }}"
357+
CONNECTOR: "google_calendar"
358+
DATA_SIZE: "small"
359+
artifact_paths:
360+
- "perf8-report-*/**/*"
361+
matrix:
362+
- "3.10"
363+
- "3.11"

.buildkite/pipeline.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,26 @@ steps:
599599
artifact_paths:
600600
- "perf8-report-*/**/*"
601601

602+
- path:
603+
- "connectors/sources/google_calendar.py"
604+
- "connectors/sources/google.py"
605+
- "tests/sources/fixtures/google_calendar/**"
606+
- "tests/sources/fixtures/fixture.py"
607+
- "${DOCKERFILE_FTEST_PATH}"
608+
- "requirements/**"
609+
config:
610+
label: "🔨 Google Calendar"
611+
<<: *test-agents
612+
<<: *retries
613+
env:
614+
- PYTHON_VERSION=3.11
615+
- DATA_SIZE=small
616+
- CONNECTOR=google_calendar
617+
command:
618+
- ".buildkite/run_functional_test.sh"
619+
artifact_paths:
620+
- "perf8-report-*/**/*"
621+
602622
# ----
603623
# DRA publishing
604624
# ----
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GOOGLE_API_FTEST_HOST=http://localhost:10340
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
service.idling: 1
2+
3+
connectors:
4+
-
5+
connector_id: 'google_calendar'
6+
service_type: 'google_calendar'
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"configuration": {
3+
"service_account_credentials": {
4+
"depends_on": [],
5+
"display": "textarea",
6+
"tooltip": null,
7+
"default_value": null,
8+
"label": "Google Calendar service account JSON",
9+
"sensitive": true,
10+
"type": "str",
11+
"required": true,
12+
"options": [],
13+
"validations": [],
14+
"value": "{\"type\":\"service_account\",\"project_id\":\"project_id\",\"private_key_id\":\"abc\",\"private_key\":\"-----BEGIN PRIVATE KEY-----\\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDY3E8o1NEFcjMM\\nHW/5ZfFJw29/8NEqpViNjQIx95Xx5KDtJ+nWn9+OW0uqsSqKlKGhAdAo+Q6bjx2c\\nuXVsXTu7XrZUY5Kltvj94DvUa1wjNXs606r/RxWTJ58bfdC+gLLxBfGnB6CwK0YQ\\nxnfpjNbkUfVVzO0MQD7UP0Hl5ZcY0Puvxd/yHuONQn/rIAieTHH1pqgW+zrH/y3c\\n59IGThC9PPtugI9ea8RSnVj3PWz1bX2UkCDpy9IRh9LzJLaYYX9RUd7++dULUlat\\nAaXBh1U6emUDzhrIsgApjDVtimOPbmQWmX1S60mqQikRpVYZ8u+NDD+LNw+/Eovn\\nxCj2Y3z1AgMBAAECggEAWDBzoqO1IvVXjBA2lqId10T6hXmN3j1ifyH+aAqK+FVl\\nGjyWjDj0xWQcJ9ync7bQ6fSeTeNGzP0M6kzDU1+w6FgyZqwdmXWI2VmEizRjwk+/\\n/uLQUcL7I55Dxn7KUoZs/rZPmQDxmGLoue60Gg6z3yLzVcKiDc7cnhzhdBgDc8vd\\nQorNAlqGPRnm3EqKQ6VQp6fyQmCAxrr45kspRXNLddat3AMsuqImDkqGKBmF3Q1y\\nxWGe81LphUiRqvqbyUlh6cdSZ8pLBpc9m0c3qWPKs9paqBIvgUPlvOZMqec6x4S6\\nChbdkkTRLnbsRr0Yg/nDeEPlkhRBhasXpxpMUBgPywKBgQDs2axNkFjbU94uXvd5\\nznUhDVxPFBuxyUHtsJNqW4p/ujLNimGet5E/YthCnQeC2P3Ym7c3fiz68amM6hiA\\nOnW7HYPZ+jKFnefpAtjyOOs46AkftEg07T9XjwWNPt8+8l0DYawPoJgbM5iE0L2O\\nx8TU1Vs4mXc+ql9F90GzI0x3VwKBgQDqZOOqWw3hTnNT07Ixqnmd3dugV9S7eW6o\\nU9OoUgJB4rYTpG+yFqNqbRT8bkx37iKBMEReppqonOqGm4wtuRR6LSLlgcIU9Iwx\\nyfH12UWqVmFSHsgZFqM/cK3wGev38h1WBIOx3/djKn7BdlKVh8kWyx6uC8bmV+E6\\nOoK0vJD6kwKBgHAySOnROBZlqzkiKW8c+uU2VATtzJSydrWm0J4wUPJifNBa/hVW\\ndcqmAzXC9xznt5AVa3wxHBOfyKaE+ig8CSsjNyNZ3vbmr0X04FoV1m91k2TeXNod\\njMTobkPThaNm4eLJMN2SQJuaHGTGERWC0l3T18t+/zrDMDCPiSLX1NAvAoGBAN1T\\nVLJYdjvIMxf1bm59VYcepbK7HLHFkRq6xMJMZbtG0ryraZjUzYvB4q4VjHk2UDiC\\nlhx13tXWDZH7MJtABzjyg+AI7XWSEQs2cBXACos0M4Myc6lU+eL+iA+OuoUOhmrh\\nqmT8YYGu76/IBWUSqWuvcpHPpwl7871i4Ga/I3qnAoGBANNkKAcMoeAbJQK7a/Rn\\nwPEJB+dPgNDIaboAsh1nZhVhN5cvdvCWuEYgOGCPQLYQF0zmTLcM+sVxOYgfy8mV\\nfbNgPgsP5xmu6dw2COBKdtozw0HrWSRjACd1N4yGu75+wPCcX/gQarcjRcXXZeEa\\nNtBLSfcqPULqD+h7br9lEJio\\n-----END PRIVATE KEY-----\\n\",\"client_email\":\"123-abc@developer.gserviceaccount.com\",\"client_id\":\"123-abc.apps.googleusercontent.com\",\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"token_uri\":\"http://localhost:10340/token\"}",
15+
"order": 1,
16+
"ui_restrictions": []
17+
},
18+
"subject": {
19+
"depends_on": [],
20+
"display": "text",
21+
"tooltip": null,
22+
"default_value": null,
23+
"label": "User email to impersonate",
24+
"sensitive": false,
25+
"type": "str",
26+
"required": true,
27+
"options": [],
28+
"validations": [],
29+
"value": "test@example.com",
30+
"order": 2,
31+
"ui_restrictions": []
32+
},
33+
"days_back": {
34+
"depends_on": [],
35+
"display": "numeric",
36+
"tooltip": null,
37+
"default_value": null,
38+
"label": "Days back to fetch events",
39+
"sensitive": false,
40+
"type": "int",
41+
"required": false,
42+
"options": [],
43+
"validations": [
44+
{
45+
"constraint": -1,
46+
"type": "greater_than"
47+
}
48+
],
49+
"value": 30,
50+
"order": 3,
51+
"ui_restrictions": []
52+
},
53+
"days_forward": {
54+
"depends_on": [],
55+
"display": "numeric",
56+
"tooltip": null,
57+
"default_value": null,
58+
"label": "Days forward to fetch events",
59+
"sensitive": false,
60+
"type": "int",
61+
"required": false,
62+
"options": [],
63+
"validations": [
64+
{
65+
"constraint": -1,
66+
"type": "greater_than"
67+
}
68+
],
69+
"value": 30,
70+
"order": 4,
71+
"ui_restrictions": []
72+
}
73+
}
74+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
version: '3.9'
2+
3+
services:
4+
elasticsearch:
5+
image: ${ELASTICSEARCH_DRA_DOCKER_IMAGE}
6+
container_name: elasticsearch
7+
environment:
8+
- cluster.name=docker-cluster
9+
- bootstrap.memory_lock=true
10+
- ES_JAVA_OPTS=-Xms2g -Xmx2g
11+
- ELASTIC_PASSWORD=changeme
12+
- xpack.security.enabled=true
13+
- xpack.security.authc.api_key.enabled=true
14+
- discovery.type=single-node
15+
- action.destructive_requires_name=false
16+
ulimits:
17+
memlock:
18+
soft: -1
19+
hard: -1
20+
volumes:
21+
- esdata:/usr/share/elasticsearch/data
22+
ports:
23+
- 9200:9200
24+
networks:
25+
- esnet
26+
27+
google_calendar:
28+
build:
29+
context: ../../../../
30+
dockerfile: ${DOCKERFILE_FTEST_PATH}
31+
command: .venv/bin/python tests/sources/fixtures/google_calendar/fixture.py
32+
ports:
33+
- "10340:10340"
34+
volumes:
35+
- .:/python-flask
36+
restart: always
37+
environment:
38+
- DATA_SIZE=${DATA_SIZE}
39+
40+
volumes:
41+
esdata:
42+
driver: local
43+
44+
networks:
45+
esnet:
46+
driver: bridge

0 commit comments

Comments
 (0)