Skip to content

Commit

Permalink
Merge pull request #568 from fomars/develop
Browse files Browse the repository at this point in the history
validator fix for null defaults
  • Loading branch information
fomars committed Apr 24, 2018
2 parents 89b46f5 + 537d02d commit a8721a6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
9 changes: 9 additions & 0 deletions Dockerfile-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ubuntu:16.04
WORKDIR /yandextank
RUN apt-get update && \
apt-get install -y python-pip
RUN pip install --upgrade setuptools
RUN pip install --upgrade pip
RUN pip install pytest
CMD pip install . && pytest -s
# docker run -v /path/to/yandextank:/yandextank --name my_container my_image
4 changes: 1 addition & 3 deletions docs/config_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,10 @@ DataUploader

``upload_token`` (string)
-------------------------
*\- Job's token. Use to upload data to an existing job. Requres jobno. Default:* ``None``
*\- Job's token. Use to upload data to an existing job. Requres jobno.*

:dependencies:
jobno
:nullable:
True

``ver`` (string)
----------------
Expand Down
6 changes: 3 additions & 3 deletions yandextank/aggregator/tests/test_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
def test_random_split(data):
dataframes = list(random_split(data))
assert len(dataframes) > 1
concatinated = pd.concat(dataframes)
assert len(concatinated) == len(data), "We did not lose anything"
concatenated = pd.concat(dataframes)
assert len(concatenated) == len(data), "We did not lose anything"
assert np.allclose(
concatinated.values, data.values), "We did not corrupt the data"
concatenated.values, data.values), "We did not corrupt the data"
5 changes: 1 addition & 4 deletions yandextank/common/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ def post_process(self, retcode):

def get_option(self, option_name, default_value=None):
""" Wrapper to get option from plugins' section """
option = self.cfg[option_name]
if option is None:
option = default_value
return option
return self.cfg.get(option_name, default_value)

def get_available_options(self):
""" returns array containing known options for plugin """
Expand Down
2 changes: 0 additions & 2 deletions yandextank/plugins/DataUploader/config/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ token_file:
upload_token:
description: Job's token. Use to upload data to an existing job. Requres jobno.
type: string
nullable: true
default: null
dependencies: jobno
ver:
description: version of the software tested
Expand Down

0 comments on commit a8721a6

Please sign in to comment.