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

Create test module: Vsftpd #14909

Merged
merged 3 commits into from
Jul 29, 2022
Merged

Create test module: Vsftpd #14909

merged 3 commits into from
Jul 29, 2022

Conversation

ShawnHa0
Copy link
Contributor

Testing vsftpd and lftp with ssl enabled. There are bugs related to this test module currently. Thus further code enhancement is anticipated when bugs are fixed or discovered acceptable workarounds. Test verification is expected to fail due to those bugs. And testing mechanisms can be enhanced once bugs are fixed.

Testing vsftpd and lftp with ssl enabled
assert_script_run('ls | grep f1.txt');

# Upload a file to directory
assert_script_run('touch f2.txt');
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest you add some context to f1.txt and f2.txt,
and if possible, md5 check for both file should be better

assert_script_run("mkdir -p $ftp_file_path");
assert_script_run("chown $user:users $ftp_file_path");

# New user needs access to ttyS0
Copy link
Contributor

Choose a reason for hiding this comment

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

Good change, l suggest you add more comment for the default permission 620, then we need change it


select_console 'root-console';

# Create a file
Copy link
Contributor

Choose a reason for hiding this comment

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

Add more comments here?

enter_cmd('cd files/');
enter_cmd('ls');
enter_cmd('put f2.txt');
enter_cmd('exit');
Copy link
Contributor

Choose a reason for hiding this comment

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

These codes could be written in a for loop to avoid repeating?

Copy link
Contributor

@jouyingbin jouyingbin left a comment

Choose a reason for hiding this comment

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

LGTM, and we will enhance the code in the future too.
Thank you.

@paolostivanin paolostivanin merged commit 0794c37 into os-autoinst:master Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants