action #46784
Updated by slemke about 5 years ago
Edit existing test: yast2_tftp.pm Add yast2-ftp-server coverage on openQA: Place of implementation: /var/lib/openqa/tests/os-autoinst-distri-opensuse/lib/main_common.pm :: sub load_extra_tests_y2uitest_gui(){} test file at: /var/lib/openqa/tests/os-autoinst-distri-opensuse/tests/yast2_gui test name: yast2_ftp_server.pm FTP module will get full coverage, tests to be implemented: **Start Up Tab:** 1- On root terminal run yast2 ftp-server: needle main window; 1.1 - In general settings, change welcome msg to 'welcome openQA', this way we can track that we are on the correct instance. 2- Click start FTP now: --> Connect via FTP CLI, confirm 'welcome openQA' string; 3- Click stop FTP now: --> Connect via FTP CLI, should not connect; 5- on SLES < 15 : Change service start from QA Product, enable manually to 'via xinetd': finish, yast2 ftp-server will close, call it for QAM: again via terminal and confirm 'via xinetd' is default startup method. - Make it backwards compatible --> Confirm systemd unit is down: systemctl list-unit-files |grep ftp |grep enabled : expected 0 Lets confirm the service started correctly: --> Connect via FTP CLI, confirm 'welcome openQA' string; 6- Change service start from manually to 'when booting': systemctl list-unit-files |grep ftp |grep enabled : expected 1 **General TAB:** 1- needle on the Main window of FTP general settings **Performance: TAB** 1- Needle FTP performance settings, this will confirm defaults. --> Create 2 system users; set max clients to 1; try to connect with all supported SLE versions; more then 1 user; - Make it backwards compatible --> Set max clients from same ip to 1; try to connect twice (different terminals); --> set timeout to 1 min, save, connect via CLI and sleep 2 minutes, session should expire. **Authentication TAB:** 1- needle the default FTP anonymous settings; 2- select authenticated users only, Go to 'Startup -> Save settings and restart FTP now' --> Try to connect via CLI and valid username, confirm 'welcome openQA' string; --> Try to connect anonymously, should fail; 3- repeat 2 for 'anonymous only': --> Try to connect via CLI and valid username, should fail with: 530 This FTP server is anonymous only. --> Try to connect with all supported Opensuse versions; anonymous : should work; 4- Select Option 'Both': - Make it compatible --> Try to connect with anonymous : should work; --> Try to connect via CLI and valid username, confirm 'welcome openQA' string; 5- Try to upload a file, should fail; 6- Authentication/Uploading Section: --> Select all future SLES upload options; --> Go to 'Startup -> Save settings and Opensuse versions; restart FTP now', say yes when it asks to create an upload folder, click finish to restart; --> Check that a folder 'upload' exists inside /srv/ftp --> Try to connect via CLI as anonymous, upload a file to /srv/ftp/upload and create a folder inside /srv/ftp/upload: both should work. Status run: Authenticated, SSL, FTP Directories: SLE12.2: http://deathstar.suse.cz/tests/1187 7- Uncheck/Disable enable upload files by anonymous(keep enable uploads): --> Try to connect via CLI as anonymous :: should connect, tr to upload a file and create a folder :: both should fail; **Expert Settings TAB:** 1- needle on the default screen 2- enable SSL: enable all 4 SSL's: -->root console, Create the certificate and the key: SLE12.3: http://deathstar.suse.cz/tests/1188 openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem --> Enable SSL and selected created certificate: SLE12.4: http://deathstar.suse.cz/tests/1189 /etc/ssl/private/vsftpd.pem --> Connection now shows SSL is in use, --> Set a folder for the authenticated users:: mkdir /srv/ftp-aut SLE15.0: http://deathstar.suse.cz/tests/1190 --> Create an upload folder: mkdir /srv/ftp-aut/uploads SLE15.1: http://deathstar.suse.cz/tests/1191 --> chmod 757 uploads/ Opensuse 15.0: http://deathstar.suse.cz/tests/1185 --> Try to connect via CLI and valid system username: should log into /srv/ftp-aut Opensuse 15.1: http://deathstar.suse.cz/tests/1186 --> upload a file and create a directory, should work. 3- Keep SSL enabled, also enable: General/chroot everyone : --> Try to connect via CLI and valid system username: should log into /srv/ftp-aut --> upload a file and create a directory, should work. 4- open port on firewall, Save settings and restart FTP now' --> open services can be checked directly calling the firewall status from cli