Skip to content

Commit 502a75f

Browse files
committed
reversion of picsum to avoid being limited. also update for input to be full hostname instead of instance id
1 parent af17b68 commit 502a75f

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ test-onprem: build
2525
docker run -it -v ${PWD}:/usr/src -w /usr/src \
2626
-e LABELBOX_TEST_ENVIRON="onprem" \
2727
-e LABELBOX_TEST_API_KEY_ONPREM=${LABELBOX_TEST_API_KEY_ONPREM} \
28-
-e LABELBOX_TEST_ONPREM_INSTANCE=${LABELBOX_TEST_ONPREM_INSTANCE} \
28+
-e LABELBOX_TEST_ONPREM_HOSTNAME=${LABELBOX_TEST_ONPREM_HOSTNAME} \
2929
local/labelbox-python:test pytest $(PATH_TO_TEST)

tests/integration/annotation_import/conftest.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,11 @@ def entity_inference(prediction_id_mapping):
223223
@pytest.fixture
224224
def segmentation_inference(prediction_id_mapping):
225225
segmentation = prediction_id_mapping['superpixel'].copy()
226-
segmentation.update({
227-
'mask': {
228-
'instanceURI': "https://picsum.photos/200/300",
226+
segmentation.update(
227+
{'mask': {
228+
'instanceURI': "sampleuri",
229229
'colorRGB': [0, 0, 0]
230-
}
231-
})
230+
}})
232231
del segmentation['tool']
233232
return segmentation
234233

@@ -253,7 +252,7 @@ def segmentation_inference_png(prediction_id_mapping):
253252
segmentation.update({
254253
'uuid': str(uuid.uuid4()),
255254
'mask': {
256-
'png': "https://picsum.photos/200/300",
255+
'png': "somedata",
257256
}
258257
})
259258
del segmentation['tool']

tests/integration/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ def graphql_url(environ: str) -> str:
4848
elif environ == Environ.STAGING:
4949
return 'https://staging-api.labelbox.com/graphql'
5050
elif environ == Environ.ONPREM:
51-
instance_id = os.environ.get('LABELBOX_TEST_ONPREM_INSTANCE', None)
52-
if instance_id is None:
51+
hostname = os.environ.get('LABELBOX_TEST_ONPREM_HOSTNAME', None)
52+
if hostname is None:
5353
raise Exception(f"Missing LABELBOX_TEST_ONPREM_INSTANCE")
54+
instance_id = hostname.split("-")[1].split(".")[0]
5455
return f"https://app.replicated-{instance_id}.labelbox.dev/api/_gql"
5556
return 'http://host.docker.internal:8080/graphql'
5657

0 commit comments

Comments
 (0)