Project

Profile

Help

Issue #5640

functional test and unit test requirements are specified in single file

Added by dkliban@redhat.com about 1 year ago. Updated about 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 61
Quarter:

Description

test_requirements.txt has requirements for unit tests, functional tests, and style tests (black).

Unit test requirements need to be installed inside containers during CI.

Functional test requirements need to be installed on the host that is running the functional tests.

Style requirements should be installed only where code style is being tested (travis host).

Right now we install test_requirements.txt on both the host and the container. The container is no longer able to install 'black' because one of the deps requires gcc. Rather than add gcc to the container we should probably break up the requirements into multiple files.

Here is an example of a failure: https://travis-ci.org/pulp/pulp_file/jobs/604662813#L1444

Associated revisions

Revision 5e9d585e View on GitHub
Added by dkliban@redhat.com about 1 year ago

Install functest_requirements.txt and unittest_requirements.txt separately

re: #5640 https://pulp.plan.io/issues/5640

History

#1 Updated by dkliban@redhat.com about 1 year ago

  • Description updated (diff)

#3 Updated by mdellweg about 1 year ago

I am wondering whether we could make use of environment markers [0].

[0] https://www.python.org/dev/peps/pep-0508/#environment-markers

#4 Updated by dkliban@redhat.com about 1 year ago

I don't think we can make good use of environment markers because there a limited number of them. We would want to use markers that we create. I don't think that is possible.

#5 Updated by dkliban@redhat.com about 1 year ago

what about using the following names for files?

test_requirements.txt - contains requirements for functional tests
unittest_requirements.txt - contains requirements for unit tests
style_requirements.txt - requirements for the static analysis or style and such

#6 Updated by daviddavis about 1 year ago

What about moving style requirements into dev_requirements.txt and having a test_requirements.txt and func_test_requirements.txt?

#7 Updated by dkliban@redhat.com about 1 year ago

i like that daviddavis

#8 Updated by ipanova@redhat.com about 1 year ago

daviddavis wrote:

What about moving style requirements into dev_requirements.txt and having a test_requirements.txt and func_test_requirements.txt?

+1

#9 Updated by gmbnomis about 1 year ago

daviddavis wrote:

What about moving style requirements into dev_requirements.txt and having a test_requirements.txt and func_test_requirements.txt?

I like that and I have one suggestion: It is possible to include requirement files in other requirement files.

We could have unittest_requirements.txt and functest_requirements.txt to make the CI happy. The usual test_requirements.txt would just include both files.

#10 Updated by mdepaulo@redhat.com about 1 year ago

This is a very good idea IMHO. We want to install as little software as possible in the containers to minimize the risk of invalidating the containers for testing. Missing (optional) deps are often the source of bugs (as a former sysadmin, I can tell you this.)

I do think that "test_requirements.txt" should be called something like "functest_requirements.txt" (like gmbnomis said.) Otherwise, unittest_requirements.txt might be assumed to be a subset of it.

#11 Updated by dkliban@redhat.com about 1 year ago

Requirement files cannot include other requirement files. So we should go with:

dev_requirements.txt
unittest_requirements.txt
functest_requirements.txt

I would like to move forward with making this change.

#12 Updated by dkliban@redhat.com about 1 year ago

It was pointed out to me that you can indeed reference requirement files in a requirements file. So that means we will have:

dev_requirements.txt
unittest_requirements.txt
functest_requirements.txt
test_requirements.txt (which will simply reference the previous 2)

#13 Updated by dkliban@redhat.com about 1 year ago

  • Status changed from NEW to MODIFIED
  • Triaged changed from No to Yes
  • Sprint set to Sprint 61

I've made this change in most of the repositories. The rest will receive this change when their travis config is updated next time.

#14 Updated by dkliban@redhat.com about 1 year ago

  • Assignee set to dkliban@redhat.com

#15 Updated by bmbouter about 1 year ago

  • Sprint/Milestone set to 3.0.0

#16 Updated by bmbouter about 1 year ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF