Skip to content

Possible Improvement Scope: Leftover Installation in the Ansible test scripts #1768

@Talismanic

Description

@Talismanic

Greetings,
I am an engineer who is interested in infrastructure as code testing. Currently, I am looking for testing anti-patterns in iac test scripts. I noticed that for testing purpose we sometimes install different packages, but do not clean those after the testing is completed. This may lead to problem in sub-sequent tests if the same environment is used in multiple testing or keep some unwanted packages installed in the environment.
For example, in this file, we can see that task is installing python3.4 and some pre-requisite dependencies. After the test, it is not cleaning any of them. Though in this case, it should not cause any problem as python is harmless. But in case someone uses same environment for testing with some python scripts compatible with 2.7, they can face some issue theoretically.

So, I have the following queries:
Do you principally agree that if any package is installed for testing purpose, we should remove the package?

Do you want to add a step to remove the packages?

Any feedback is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions