Project

Profile

Help

Issue #5640

closed

functional test and unit test requirements are specified in single file

Added by dkliban@redhat.com over 4 years ago. Updated over 4 years 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

Actions #1

Updated by dkliban@redhat.com over 4 years ago

  • Description updated (diff)
Actions #3

Updated by mdellweg over 4 years ago

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

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

Actions #4

Updated by dkliban@redhat.com over 4 years 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.

Actions #5

Updated by dkliban@redhat.com over 4 years 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

Actions #6

Updated by daviddavis over 4 years ago

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

Actions #7

Updated by dkliban@redhat.com over 4 years ago

i like that @daviddavis

Actions #8

Updated by ipanova@redhat.com over 4 years ago

daviddavis wrote:

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

+1

Actions #9

Updated by gmbnomis over 4 years 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.

Actions #10

Updated by mdepaulo@redhat.com over 4 years 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.

Actions #11

Updated by dkliban@redhat.com over 4 years 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.

Actions #12

Updated by dkliban@redhat.com over 4 years 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)

Added by dkliban@redhat.com over 4 years ago

Revision 5e9d585e | View on GitHub

Install functest_requirements.txt and unittest_requirements.txt separately

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

Actions #13

Updated by dkliban@redhat.com over 4 years 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.

Actions #14

Updated by dkliban@redhat.com over 4 years ago

  • Assignee set to dkliban@redhat.com
Actions #15

Updated by bmbouter over 4 years ago

  • Sprint/Milestone set to 3.0.0
Actions #16

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF