Skip to content

Commit b590d27

Browse files
Refactor: Update owner config tests QUICK-START guide paths
Co-authored-by: yourton.ma <yourton.ma@gmail.com>
1 parent cdf7ce0 commit b590d27

File tree

1 file changed

+29
-16
lines changed
  • ingestion/tests/unit/metadata/ingestion/owner_config_tests

1 file changed

+29
-16
lines changed

ingestion/tests/unit/metadata/ingestion/owner_config_tests/QUICK-START.md

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ This guide helps you quickly set up and run the owner configuration tests.
1717
## Step 1: Start PostgreSQL Test Database
1818

1919
```bash
20-
cd /workspace/ingestion/tests/unit/metadata/ingestion/owner_config_tests
20+
# Navigate to OpenMetadata root directory first
21+
cd ~/path/to/OpenMetadata
22+
23+
# Then navigate to test directory
24+
cd ingestion/tests/unit/metadata/ingestion/owner_config_tests
2125
docker-compose up -d
2226
```
2327

@@ -42,7 +46,8 @@ docker ps | grep postgres
4246
### Option A: Using Setup Script (Easiest ⭐)
4347

4448
```bash
45-
cd /workspace/ingestion/tests/unit/metadata/ingestion/owner_config_tests
49+
# From OpenMetadata root directory
50+
cd ingestion/tests/unit/metadata/ingestion/owner_config_tests
4651

4752
# Method 1: Set environment variable
4853
export OPENMETADATA_JWT_TOKEN="your_jwt_token_here"
@@ -116,7 +121,7 @@ Teams: 11/11
116121
117122
Next steps:
118123
1. Update JWT tokens in test YAML files
119-
2. Run tests: cd /workspace/ingestion && metadata ingest -c tests/unit/metadata/ingestion/owner_config_tests/test-05-inheritance-enabled.yaml
124+
2. Run tests: cd <OpenMetadata-root> && metadata ingest -c ingestion/tests/unit/metadata/ingestion/owner_config_tests/test-05-inheritance-enabled.yaml
120125
```
121126

122127
### Option B: Manual API Calls
@@ -174,12 +179,18 @@ curl -X GET "${API_URL}/teams?limit=20" \
174179
Edit the JWT token in test files:
175180

176181
```bash
177-
cd /workspace/ingestion/tests/unit/metadata/ingestion/owner_config_tests
182+
# From OpenMetadata root directory
183+
cd ingestion/tests/unit/metadata/ingestion/owner_config_tests
178184

179-
# Replace JWT_TOKEN in all test files
185+
# Replace JWT_TOKEN in all test files (macOS)
180186
for test in test-*.yaml; do
181187
sed -i '' 's/YOUR_JWT_TOKEN_HERE/your_actual_jwt_token_here/g' "$test"
182188
done
189+
190+
# Or on Linux:
191+
# for test in test-*.yaml; do
192+
# sed -i 's/YOUR_JWT_TOKEN_HERE/your_actual_jwt_token_here/g' "$test"
193+
# done
183194
```
184195

185196
Or manually edit each file and replace:
@@ -196,8 +207,8 @@ Before running tests, set up your Python environment:
196207
### Activate Virtual Environment
197208
198209
```bash
199-
# Navigate to OpenMetadata workspace root
200-
cd ~/workspace/OpenMetadata
210+
# Navigate to OpenMetadata root directory
211+
cd ~/path/to/OpenMetadata
201212

202213
# Activate the virtual environment
203214
source env/bin/activate
@@ -208,7 +219,8 @@ source env/bin/activate
208219
If `metadata` command is not found:
209220

210221
```bash
211-
cd ~/workspace/OpenMetadata/ingestion
222+
# From OpenMetadata root directory
223+
cd ingestion
212224

213225
# Install OpenMetadata ingestion package
214226
pip install -e .
@@ -220,14 +232,14 @@ pip install -e '.[postgres]'
220232

221233
## Step 6: Run Tests
222234

223-
**Important**: All commands assume you're in the workspace root directory (`/workspace/OpenMetadata`).
235+
**Important**: All commands assume you're in the **OpenMetadata root directory**.
224236

225237
### Run a Single Test
226238

227239
Here's how to run one test to verify everything is working:
228240

229241
```bash
230-
# Run Test 05 (Inheritance test - most critical)
242+
# From OpenMetadata root directory, run Test 05 (Inheritance test - most critical)
231243
metadata ingest -c ingestion/tests/unit/metadata/ingestion/owner_config_tests/test-05-inheritance-enabled.yaml
232244
```
233245

@@ -238,6 +250,7 @@ metadata ingest -c ingestion/tests/unit/metadata/ingestion/owner_config_tests/te
238250

239251
**Run with verbose logging** (for debugging):
240252
```bash
253+
# From OpenMetadata root directory
241254
metadata ingest -c ingestion/tests/unit/metadata/ingestion/owner_config_tests/test-05-inheritance-enabled.yaml --log-level DEBUG
242255
```
243256

@@ -248,12 +261,12 @@ metadata ingest -c ingestion/tests/unit/metadata/ingestion/owner_config_tests/te
248261
Use the provided script to run all 8 tests automatically:
249262

250263
```bash
251-
# Make sure you're in workspace root with virtual environment activated
252-
# cd /workspace/OpenMetadata
264+
# Make sure you're in OpenMetadata root with virtual environment activated
265+
# cd ~/path/to/OpenMetadata
253266
# source env/bin/activate
254267

255-
# Run the test script
256-
cd ./ingestion/tests/unit/metadata/ingestion/owner_config_tests
268+
# Navigate to test directory and run the script
269+
cd ingestion/tests/unit/metadata/ingestion/owner_config_tests
257270
./run-all-tests.sh
258271
```
259272

@@ -353,8 +366,8 @@ Please check the results on the OpenMetaData web interface to see if it is consi
353366
When done testing:
354367

355368
```bash
356-
# Stop and remove PostgreSQL
357-
cd /workspace/ingestion/tests/unit/metadata/ingestion/owner_config_tests
369+
# Stop and remove PostgreSQL (from OpenMetadata root directory)
370+
cd ingestion/tests/unit/metadata/ingestion/owner_config_tests
358371
docker-compose down -v
359372

360373
# Remove test entities from OpenMetadata (optional)

0 commit comments

Comments
 (0)