New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle when ca_certs is None in utils.http #48893

Merged
merged 2 commits into from Aug 3, 2018

Conversation

Projects
None yet
3 participants
@Ch3LL
Contributor

Ch3LL commented Aug 2, 2018

What does this PR do?

The following tests are failing on macosx:

integration.modules.test_cp.CPModuleTest.test_get_file_str_https
integration.modules.test_cp.CPModuleTest.test_get_url_https
integration.modules.test_cp.CPModuleTest.test_get_url_https_no_dest
integration.modules.test_cp.CPModuleTest.test_get_url_https_dest_empty

here is the traceback:

u'Bootstrap' not found in u"Passed invalid arguments to cp.get_file_str: expected str, bytearray, or unicode\n\n    Download a file from a URL to the Minion cache directory and return the\n    contents of that file\n\n    Returns ``False`` if Salt was unable to cache a file from a URL.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' cp.get_file_str salt://my/file\n    "

This was due to this PR:

#48754

because sometimes ca_certs can be None. From the tornado docs (http://www.tornadoweb.org/en/stable/httpclient.html)

ca_certs (str) – filename of CA certificates in PEM format, or None to use defaults.

And we are trying to convert a None variable to a string which causes a TypeError.

@Ch3LL

This comment has been minimized.

Contributor

Ch3LL commented Aug 2, 2018

this should also fix these test failures:


unit.modules.test_random_org.RandomOrgTestCase.test_generateblobs
unit.modules.test_random_org.RandomOrgTestCase.test_generatedecimalfractions
unit.modules.test_random_org.RandomOrgTestCase.test_generategaussians
unit.modules.test_random_org.RandomOrgTestCase.test_generateintegers
unit.modules.test_random_org.RandomOrgTestCase.test_generatestrings
unit.modules.test_random_org.RandomOrgTestCase.test_generateuuids
unit.modules.test_random_org.RandomOrgTestCase.test_getusage
unit.templates.test_jinja.TestCustomExtensions.test_http_query
integration.states.test_archive.ArchiveTest.test_archive_extracted_skip_verify
integration.states.test_archive.ArchiveTest.test_archive_extracted_with_cmd_unzip_false
integration.states.test_archive.ArchiveTest.test_archive_extracted_with_root_user_and_group
integration.states.test_archive.ArchiveTest.test_archive_extracted_with_source_hash
integration.states.test_archive.ArchiveTest.test_archive_extracted_with_strip_components_in_options
integration.states.test_archive.ArchiveTest.test_archive_extracted_with_strip_in_options
integration.states.test_archive.ArchiveTest.test_archive_extracted_without_archive_format
integration.states.test_file.RemoteFileTest.test_file_managed_http_source
integration.states.test_file.RemoteFileTest.test_file_managed_http_source_skip_verify

@rallytime rallytime merged commit 848e26e into saltstack:2018.3 Aug 3, 2018

7 of 8 checks passed

jenkins/pr/py2-centos-7 running py2-centos-7...
Details
WIP ready for review
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has passed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment