Skip to content

Commit

Permalink
DB-1436 (#110)
Browse files Browse the repository at this point in the history
* updating mappings

* fixing unit test

* maybe fixing unit test

* maybe fixing unit test

* maybe fixing unit test

* maybe fixing unit test

* maybe fixing unit test

* maybe fixing unit test

* fixed unit test

* updates from pr

* unit test fix
  • Loading branch information
macedomario authored Jun 1, 2022
1 parent 72d24f7 commit b2a4b64
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
5 changes: 4 additions & 1 deletion syngenta_digital_dta/elasticsearch/es_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def __translate_simple_type(property_value):
elif property_value.get('type') == 'number':
mapping_type = {'type': 'long'}
elif property_value.get('type') == 'string':
mapping_type = {'type': 'text'}
if property_value.get('format', '') == 'byte':
mapping_type = {'type': 'binary'}
else:
mapping_type = {'type': 'text'}
elif property_value.get('type') == 'array':
mapping_type = None
else:
Expand Down
13 changes: 11 additions & 2 deletions tests/syngenta_digital_dta/s3/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,17 @@ def setUp(self, *args, **kwargs):

def __create_unit_test_bucket(self):
try:
s3_client = boto3.client('s3', endpoint_url=self.endpoint)
s3_client.create_bucket(Bucket=self.bucket)
s3_client = boto3.client(
"s3",
endpoint_url=self.endpoint,
region_name="us-east-2",
)
s3_client.create_bucket(
Bucket=self.bucket,
CreateBucketConfiguration={
'LocationConstraint': 'us-east-2'
}
)
except:
pass

Expand Down

0 comments on commit b2a4b64

Please sign in to comment.