Skip to content

Add test for installing OpenCAS from RPM package#391

Open
Ostrokrzew wants to merge 8 commits intoOpen-CAS:masterfrom
Ostrokrzew:test_rpm
Open

Add test for installing OpenCAS from RPM package#391
Ostrokrzew wants to merge 8 commits intoOpen-CAS:masterfrom
Ostrokrzew:test_rpm

Conversation

@Ostrokrzew
Copy link
Contributor

@Ostrokrzew Ostrokrzew commented Apr 9, 2020

@Ostrokrzew Ostrokrzew added the RFC Request For Comments label Apr 9, 2020
@pep8speaks
Copy link

pep8speaks commented Apr 9, 2020

Hello @Ostrokrzew! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-09-14 13:52:24 UTC

@Ostrokrzew Ostrokrzew changed the title Add test for installing OpenCA from RPM package Add test for installing OpenCAS from RPM package Apr 15, 2020
@Ostrokrzew Ostrokrzew force-pushed the test_rpm branch 2 times, most recently from 547e1a2 to 61f062b Compare May 4, 2020 13:35
@Ostrokrzew Ostrokrzew requested a review from robertbaldyga May 19, 2020 13:36
@Ostrokrzew Ostrokrzew removed the RFC Request For Comments label May 19, 2020
@Ostrokrzew Ostrokrzew force-pushed the test_rpm branch 4 times, most recently from db16c41 to 2c94637 Compare May 28, 2020 08:40
@Ostrokrzew Ostrokrzew requested review from mmichal10 and rafalste May 28, 2020 08:41
@katlapinka
Copy link
Contributor

retest this please

@Ostrokrzew Ostrokrzew force-pushed the test_rpm branch 2 times, most recently from b1d5521 to cb7b117 Compare June 10, 2020 12:49
@Ostrokrzew Ostrokrzew force-pushed the test_rpm branch 2 times, most recently from 4440dd5 to 4d6e523 Compare June 25, 2020 09:09
@katlapinka
Copy link
Contributor

retest this please

@Ostrokrzew Ostrokrzew force-pushed the test_rpm branch 4 times, most recently from c6b3086 to 3b7448a Compare August 7, 2020 08:21
@Ostrokrzew Ostrokrzew force-pushed the test_rpm branch 4 times, most recently from 8ed9d93 to c984623 Compare August 12, 2020 09:11
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
Remove unused imports from `installer` module.
Create class from `installer` with static methods.
Wrap `_rsync_opencas`.
Add timeout to `_rsync_opencas`.
Extract checking if `casadm` works.
Remove checking if CAS is installed from `uninstall_opencas` method.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
`RpmInstaller` overwrites few methods to handle RPM functionality.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
Add parsing new CLI flag `--rpm-install` to inform framework
that user want to install OpenCAS not from sources (default),
but from RPM packages.
Additionaly user can pass in config file own path to ready-to-install
RPM packages.
Extend `Opencas` class with field `rpm_dir`.
Use new pytest mark in prepare stage.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
Comment on lines +99 to +105
TestRun.LOGGER.info("Check if 'casadm' is properly installed.")
output = TestRun.executor.run("casadm -V")
if output.exit_code != 0:
return False
else:
TestRun.LOGGER.info(output.stdout)
return True
Copy link
Contributor

Choose a reason for hiding this comment

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

'which casadm' does the job, and we don't need output from casadm here

installer.reinstall_opencas()
elif not installer.check_if_installed():
installer.rsync_opencas_sources()
elif not opencas_installed and not uninstall_cas:
Copy link
Contributor

Choose a reason for hiding this comment

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

uninstall_cas is always False here

if opencas_installed:
RpmInstaller.uninstall_opencas()
elif get_force_param(item) and not TestRun.usr.already_updated:
installer.reinstall_opencas()
Copy link
Contributor

Choose a reason for hiding this comment

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

If RPM is installed and we want to reinstall from sources then installer.reinstall_opencas() will try to remove only source-based installation (and fail), and then will try to install from sources although RPM would still be installed.

@CAS-Linux-Jenkins
Copy link

Can one of the admins verify this patch?

@katlapinka
Copy link
Contributor

Remove kedr test and update test for rpm installer

Copy link
Contributor

@Deixx Deixx left a comment

Choose a reason for hiding this comment

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

test-framework patch lost

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

Labels

RFC Request For Comments tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants