Skip to content

Commit a247f50

Browse files
authored
Cleanup
README copyright test config file strip '-SNAPSHOT' from version if present in test comparison Add JsonNone to deserialization for query testing
1 parent 396bade commit a247f50

File tree

4 files changed

+34
-3
lines changed

4 files changed

+34
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ that the *borneo* package has been installed.
8181
``` python
8282

8383
#
84-
# Copyright (c) 2018, 2022 Oracle and/or its affiliates. All rights reserved.
84+
# Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved.
8585
#
8686
# Licensed under the Universal Permissive License v 1.0 as shown at
8787
# https://oss.oracle.com/licenses/upl/

src/borneo/serdeutil.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,8 @@ def get_type(value):
835835
return SerdeUtil.FIELD_VALUE_TYPE.NULL
836836
elif isinstance(value, Empty):
837837
return SerdeUtil.FIELD_VALUE_TYPE.EMPTY
838+
elif isinstance(value, JsonNone):
839+
return SerdeUtil.FIELD_VALUE_TYPE.JSON_NULL
838840
else:
839841
raise IllegalStateException(
840842
'Unknown value type ' + str(type(value)))

test/config.py

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1-
endpoint = 'http://localhost:8080'
2-
version = '22.4.10'
1+
#
2+
# Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved.
3+
#
4+
# Licensed under the Universal Permissive License v 1.0 as shown at
5+
# https://oss.oracle.com/licenses/upl/
6+
7+
#
8+
# Parameters used by test code -- Cloud Simulator Configuration
9+
#
10+
# This file is configured for the unit tests to be run against a Cloud Simulator
11+
# instance. The simulator is used so that limits that exist in the cloud service
12+
# are not involved and there is no cost involved in running the unit tests.
13+
#
14+
# The default settings below are sufficient if the Cloud Simulator has been
15+
# started on the endpoint, localhost:8080, which is its default. If not, the
16+
# parameters in this file should be changed as needed. This is a backup of
17+
# config.py, when config.py is overwritten by other config*.py, the default
18+
# config.py of Cloud Simulator is back up in this file.
19+
#
20+
21+
# The endpoint to use to connect to the service. This endpoint is for a Cloud
22+
# Simulator running on its default port (8080) on the local machine.
23+
endpoint = 'localhost:8080'
24+
25+
# The server type, please don't change it.
326
server_type = 'cloudsim'
27+
28+
# Cloud Simulator version. Use None to test with the latest Cloud Simulator
29+
# version, a specified version should be like "1.4.0".
30+
version = None

test/testutils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def compare_version(specified, internal):
9393
If the user specified version is newer than internal check version return 1,
9494
older return -1, same return 0.
9595
"""
96+
#if version is a snapshot, strip that portion
97+
specified = specified.strip('-SNAPSHOT')
9698
specified_check = match('\d+(\.\d+){0,2}', specified)
9799
internal_check = match('\d+(\.\d+){0,2}', internal)
98100
if (specified_check is None or internal_check is None or

0 commit comments

Comments
 (0)