-
Notifications
You must be signed in to change notification settings - Fork 94
/
conftest.py
44 lines (30 loc) · 951 Bytes
/
conftest.py
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
import os
import pytest
@pytest.fixture(scope="session")
def host():
return os.getenv("DATABRICKS_SERVER_HOSTNAME")
@pytest.fixture(scope="session")
def http_path():
return os.getenv("DATABRICKS_HTTP_PATH")
@pytest.fixture(scope="session")
def access_token():
return os.getenv("DATABRICKS_TOKEN")
@pytest.fixture(scope="session")
def ingestion_user():
return os.getenv("DATABRICKS_USER")
@pytest.fixture(scope="session")
def catalog():
return os.getenv("DATABRICKS_CATALOG")
@pytest.fixture(scope="session")
def schema():
return os.getenv("DATABRICKS_SCHEMA", "default")
@pytest.fixture(scope="session", autouse=True)
def connection_details(host, http_path, access_token, ingestion_user, catalog, schema):
return {
"host": host,
"http_path": http_path,
"access_token": access_token,
"ingestion_user": ingestion_user,
"catalog": catalog,
"schema": schema,
}