* setting up initial part for release sdk

* removed custom sdk

* fixed version specific test issues.

* fixed version check

* change back the allowable_lines_not_found

* Revert "removed custom sdk"

This reverts commit 0fc2ccf6e3.

* potential solution for flipping libraries

* fixed spacing

* fixed linting error

* fixed linting error

* fixed linting error

* removed unreleased line
This commit is contained in:
jeffj6123 2019-12-18 10:40:16 -08:00 коммит произвёл GitHub
Родитель 628b5c1044
Коммит e20068974e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 20 добавлений и 15 удалений

Просмотреть файл

@ -16,7 +16,7 @@ To get started, after installation run the following:
Change Log
==========
Unreleased
9.0.0
----------
- Added configuration overrides node commands. These commands will be available in the Service fabric runtime 7.0 version (#206)
- Provide option to compress packages on application upload. By default, the newly generated compressed package is deleted after successful upload. (#191)

Просмотреть файл

@ -17,7 +17,7 @@ def read(fname):
setup(
name='sfctl',
version='8.0.0',
version='9.0.0',
description='Azure Service Fabric command line',
long_description=read('README.rst'),
url='https://github.com/Azure/service-fabric-cli',
@ -48,7 +48,7 @@ setup(
'msrest>=0.5.0',
'msrestazure',
'requests',
'azure-servicefabric==6.5.0.0',
'azure-servicefabric==7.0.0.0',
'adal',
'future',
'applicationinsights',

Просмотреть файл

@ -272,9 +272,9 @@ def sfctl_cluster_version_matches(cluster_version, sfctl_version):
:return: True if they are a match. False otherwise.
"""
if sfctl_version in ['8.0.0']:
if sfctl_version in ['9.0.0']:
return cluster_version.startswith('6.5')
return cluster_version.startswith('7.0')
# If we forget to update this code before a new release, the tests which call this method
# will fail.

Просмотреть файл

@ -11,7 +11,7 @@ from knack.help_files import helps
helps[''] = """
type: group
short-summary: Commands for managing Service Fabric clusters
and entities. This version is compatible with Service Fabric 6.5
and entities. This version is compatible with Service Fabric 7.0
runtime.
long-summary: Commands follow the noun-verb pattern. See subgroups for more
information.

Просмотреть файл

@ -61,7 +61,7 @@ class ClusterTests(unittest.TestCase):
# An exception will be raised if the current cluster version doesn't exist in the function
try:
self.assertTrue(sfctl_cluster_version_matches('6.5', current_sfctl_version),
self.assertTrue(sfctl_cluster_version_matches('7.0', current_sfctl_version),
msg='You are most likely getting this error because we need to '
'update the method sfctl_cluster_version_matches in '
'custom_cluster so that it works with the '

Просмотреть файл

@ -88,7 +88,10 @@ class CustomHelpTextCorrectnessTests(unittest.TestCase):
# A list of strings containing abs paths to the SDK api file and model files
# start off containing the SDK API file
# List of strings
sdk_files_path = [join(sdk_path, 'service_fabric_client_ap_is.py')]
# Only one service_fabric_client_ap_is.py should exist but can appear differently depending on if its custom sdk
# or if its the official release.
sdk_files_path = [join(sdk_path, '_service_fabric_client_ap_is.py'),
join(sdk_path, 'service_fabric_client_ap_is.py')]
# Add all the models files
models_path = join(sdk_path, 'models')
@ -97,8 +100,11 @@ class CustomHelpTextCorrectnessTests(unittest.TestCase):
sdk_files_path.append(join(models_path, file_name))
for python_file_path in sdk_files_path:
lines = [line.strip() for line in open(python_file_path)]
doc_strings.append(' '.join(lines).lower())
try:
lines = [line.strip() for line in open(python_file_path)]
doc_strings.append(' '.join(lines).lower())
except: # pylint: disable=bare-except
print("missing - {0}".format(python_file_path))
return doc_strings
@ -224,7 +230,7 @@ class CustomHelpTextCorrectnessTests(unittest.TestCase):
print()
print(line)
allowable_lines_not_found = 85
allowable_lines_not_found = [148, 85]
print()
print('The total number of lines compared is ' + str(len(custom_help_lines)))
@ -234,6 +240,5 @@ class CustomHelpTextCorrectnessTests(unittest.TestCase):
str(len(CustomHelpTextCorrectnessTests.exclusion_list)))
# Assert if there are any lines which do not match.
self.assertEqual(len(lines_not_found), allowable_lines_not_found,
msg='The allowable mismatched documentation lines does not match '
'the actual number.')
self.assertTrue(len(lines_not_found) in allowable_lines_not_found,
msg='The allowable mismatched documentation lines does not match the actual number.')

Просмотреть файл

@ -16,7 +16,7 @@ class VersionTests(unittest.TestCase):
note: this will require changing the sfctl_version on releases
"""
sfctl_version = '8.0.0'
sfctl_version = '9.0.0'
pipe = Popen('sfctl --version', shell=True, stdout=PIPE, stderr=PIPE)
# returned_string and err are returned as bytes