Skip to content

Commit 85cff88

Browse files
committed
undo some stuff
1 parent db78499 commit 85cff88

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ build:
66
test-local: build
77
docker run -it -v ${PWD}:/usr/src -w /usr/src \
88
-e LABELBOX_TEST_ENVIRON="local" \
9-
-e LABELBOX_TEST_API_KEY_LOCAL=${LABELBOX_TEST_API_KEY} \
9+
-e LABELBOX_TEST_API_KEY_LOCAL=${LABELBOX_TEST_API_KEY_LOCAL} \
1010
local/labelbox-python:test pytest $(PATH_TO_TEST) -svvx
1111

1212
test-staging: build
1313
docker run -it -v ${PWD}:/usr/src -w /usr/src \
1414
-e LABELBOX_TEST_ENVIRON="staging" \
15-
-e LABELBOX_TEST_API_KEY_STAGING=${LABELBOX_TEST_API_KEY} \
15+
-e LABELBOX_TEST_API_KEY_STAGING=${LABELBOX_TEST_API_KEY_STAGING} \
1616
local/labelbox-python:test pytest $(PATH_TO_TEST) -svvx
1717

1818
test-prod: build
1919
docker run -it -v ${PWD}:/usr/src -w /usr/src \
2020
-e LABELBOX_TEST_ENVIRON="prod" \
21-
-e LABELBOX_TEST_API_KEY_PROD=${LABELBOX_TEST_API_KEY} \
21+
-e LABELBOX_TEST_API_KEY_PROD=${LABELBOX_TEST_API_KEY_PROD} \
2222
local/labelbox-python:test pytest $(PATH_TO_TEST) -svvx

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pip3 install -r requirements.txt
5656
Labelbox uses API keys to validate requests. You can create and manage API keys on [Labelbox](https://app.labelbox.com/account/api-keys). Pass your API key as an environment variable. Then, import and initialize the API Client.
5757

5858
```
59-
user@machine:~$ export LABELBOX_API_KEY="<your api key here>"
59+
user@machine:~$ export LABELBOX_TEST_API_KEY_LOCAL="<your local api key here>"
6060
user@machine:~$ python3
6161
6262
from labelbox import Client
@@ -68,17 +68,25 @@ Please consult `CONTRIB.md`
6868

6969
## Testing
7070
1. Update the `Makefile` with your `local`, `staging`, `prod` API key. Ensure that docker has been installed on your system. Make sure the key is not from a free tier account.
71-
2. To test on `staging`:
71+
2. To test on `local`:
7272
```
73-
make test-staging PATH_TO_TEST=tests/integration/...etc LABELBOX_TEST_API_KEY=specify_here_or_export_me
73+
user@machine:~$ export LABELBOX_TEST_API_KEY_LOCAL="<your local api key here>"
74+
make test-local # with an optional flag: PATH_TO_TEST=tests/integration/...etc LABELBOX_TEST_API_KEY=specify_here_or_export_me
7475
```
7576

76-
3. To test on `prod`:
77+
3. To test on `staging`:
7778
```
78-
make test-prod PATH_TO_TEST=tests/integration/...etc LABELBOX_TEST_API_KEY=specify_here_or_export_me
79+
user@machine:~$ export LABELBOX_TEST_API_KEY_STAGING="<your staging api key here>"
80+
make test-staging # with an optional flag: PATH_TO_TEST=tests/integration/...etc LABELBOX_TEST_API_KEY=specify_here_or_export_me
7981
```
8082

81-
4. If you make any changes and need to rebuild the image used for testing, force a rebuild with the `-B` flag
83+
4. To test on `prod`:
84+
```
85+
user@machine:~$ export LABELBOX_TEST_API_KEY_PROD="<your prod api key here>"
86+
make test-prod # with an optional flag: PATH_TO_TEST=tests/integration/...etc LABELBOX_TEST_API_KEY=specify_here_or_export_me
87+
```
88+
89+
5. If you make any changes and need to rebuild the image used for testing, force a rebuild with the `-B` flag
8290
```
8391
make -B {build|test-staging|test_prod}
8492
```

0 commit comments

Comments
 (0)