Skip to content
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

testhelper: introduce class SMBClient - pysmb version #76

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

spuiuk
Copy link
Collaborator

@spuiuk spuiuk commented Mar 28, 2024

This helper class SMBClient provides us with a wrapper around the pysmb module to help replace the smbclient binary.

Unlike PR #74, we use the pysmb module here instead which is a pure python module and is therefore easier to install on our test systems.

testhelper/smbclient.py Outdated Show resolved Hide resolved
testhelper/smbclient.py Outdated Show resolved Hide resolved
testhelper/smbclient.py Outdated Show resolved Hide resolved
testhelper/smbclient.py Outdated Show resolved Hide resolved
testhelper/smbclient.py Outdated Show resolved Hide resolved
testhelper/smbclient.py Outdated Show resolved Hide resolved
testhelper/smbclient.py Show resolved Hide resolved
test_filename = "/test_consistency"

# file write cycle
scon = SMBClient(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better rename to smb_clnt (I was almost confused with scons build system)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed.

testhelper/smbclient.py Show resolved Hide resolved
testhelper/smbclient.py Outdated Show resolved Hide resolved
We use the python module pysmb to access the SMB server.
The helper class hides the complexities and helps us bypass the
smbclient binary to connect to the remote samba server giving us more
flexibility in the python tests.

Signed-off-by: Sachin Prabhu <[email protected]>
Copy link
Collaborator

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

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

looka ok to me

Copy link
Collaborator

@synarete synarete left a comment

Choose a reason for hiding this comment

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

lgtm

@spuiuk spuiuk merged commit 0ee7418 into samba-in-kubernetes:main Apr 5, 2024
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants