Skip to content

test_client.py from kubernetes-client#24

Open
pavel-ignatovich wants to merge 1 commit intomasterfrom
py_kubernetes-client_test_client.py
Open

test_client.py from kubernetes-client#24
pavel-ignatovich wants to merge 1 commit intomasterfrom
py_kubernetes-client_test_client.py

Conversation

@pavel-ignatovich
Copy link
Copy Markdown

Copy link
Copy Markdown

@monocodus monocodus Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is autogenerated code-style review, new suggestions: 18

Comment thread test_client.py
}
}

class TestClient(unittest.TestCase):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class TestClient(unittest.TestCase):
class TestClient(unittest.TestCase):

This comment was generated with the following checker: AutoPEP8

Comment thread test_client.py
'-c',
'for i in $(seq 1 3); do date; done']
resp = stream(api.connect_get_namespaced_pod_exec, name, 'default',
command=exec_command,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
command=exec_command,
command=exec_command,

This comment was generated with the following checker: AutoPEP8

Comment thread test_client.py
'for i in $(seq 1 3); do date; done']
resp = stream(api.connect_get_namespaced_pod_exec, name, 'default',
command=exec_command,
stderr=False, stdin=False,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stderr=False, stdin=False,
stderr=False, stdin=False,

This comment was generated with the following checker: AutoPEP8

Comment thread test_client.py
resp = stream(api.connect_get_namespaced_pod_exec, name, 'default',
command=exec_command,
stderr=False, stdin=False,
stdout=True, tty=False)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stdout=True, tty=False)
stdout=True, tty=False)

This comment was generated with the following checker: AutoPEP8

Comment thread test_client.py

exec_command = 'uptime'
resp = stream(api.connect_post_namespaced_pod_exec, name, 'default',
command=exec_command,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
command=exec_command,
command=exec_command,

This comment was generated with the following checker: AutoPEP8

Comment thread test_client.py
for command, value in commands_expected_values:
client = stream(api.connect_get_namespaced_pod_exec, name, 'default',
command=command,
stderr=True, stdin=False,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stderr=True, stdin=False,
stderr=True, stdin=False,

This comment was generated with the following checker: AutoPEP8

Comment thread test_client.py
client = stream(api.connect_get_namespaced_pod_exec, name, 'default',
command=command,
stderr=True, stdin=False,
stdout=True, tty=False,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stdout=True, tty=False,
stdout=True, tty=False,

This comment was generated with the following checker: AutoPEP8

Comment thread test_client.py
command=command,
stderr=True, stdin=False,
stdout=True, tty=False,
_preload_content=False)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_preload_content=False)
_preload_content=False)

This comment was generated with the following checker: AutoPEP8

Comment thread test_client.py
def setUpClass(cls):
cls.config = base.get_e2e_configuration()

def test_pod_apis(self):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function is too long

test_pod_apis( self ) now spans 57 lines.
Corresponding modifications started here.
Keep your functions' length within 50 lines to improve readability.

This comment was generated with the following checker: long_method

Comment thread test_client.py
break
time.sleep(1)

commands_expected_values = (
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name is too long

Variable name commands_expected_values is now 24 characters long.
Keep length of your variable names within 20 characters to improve readability.

This comment was generated with the following checker: naming_analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant