Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acceptance test environment #88

Merged
merged 59 commits into from
Jan 27, 2017
Merged

Acceptance test environment #88

merged 59 commits into from
Jan 27, 2017

Conversation

Metallion
Copy link
Contributor

@Metallion Metallion commented Jan 25, 2017

Finally the acceptance test environment is in a state where we can start writing proper tests. In short:

  • Package acceptance test code as openvdc-acceptance-test package
  • Run docker container that installs said package and builds the test environment
  • Run tests
  • Destroy container unless LEAVE_CONTAINER is set.

Additional change to openvdc-cli package:

  • Added a symlink to the openvdc binary in /usr/bin so the openvdc command is in PATH immediately after installing.

Current tests written:

  • Check if openvdc command can be run and outputs usage.

More detailed information is in the readme included in this diff.

Metallion added 30 commits January 11, 2017 16:09
…e're going to compile the tests and package it instead
…docker from there and pass in the multibox scripts instead of mounting them
…eated by failing builds doesn't break other builds/contrainers
… we're going to have the CI build it in docker
…ctly how we're going to have the CI build it in docker"

This reverts commit ccae2aa.
@triggers
Copy link
Member

Looks impressive.

Things to add:

  1. What bare metal OS versions has it been run successfully on? Docker version?
  2. How much disk/memory is required?
  3. How long does it take to run?
  4. What does successful output look like?
  5. Are all the side effects kept under one directory? Where else will it put stuff?
  6. Where are the most important log files?

@Metallion
Copy link
Contributor Author

Metallion commented Jan 25, 2017

1.1. Will add to the readme. (Fedora 23 and Arch)
1.2. Will add this too. (1.10.3 on Fedora and 1.12.6 on Arch)
2. Will add.

The other items don't really need to be in the readme imo but here's the answers.

  1. About 20 minutes the first time and about 5 minutes afterwards
  2. https://ci.openvdc.org/job/citest/job/acceptance-test/32/console
  3. Everything's in either the cache directory or the docker container. So all directories it does stuff to are in the readme.
  4. It doesn't keep log files. Just the output in Jenkins.

@toros11
Copy link
Member

toros11 commented Jan 25, 2017

Perhaps we can re-enable the feature that uses cache images for develop/master unless rebuild flag set. It would save time when building branches and unless anything happened to the CI itself there is no need to build all images from scratch.

@Metallion
Copy link
Contributor Author

Metallion commented Jan 25, 2017

Perhaps we can re-enable the feature that uses cache images for develop/master

On my TODO list. :p #89

Copy link
Contributor

@unakatsuo unakatsuo left a comment

Choose a reason for hiding this comment

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

Why do we need to run docker commands with sudo?

docker rpm creates dockerroot group and the UNIX users who want to operate docker command just need to join the group.

@Metallion
Copy link
Contributor Author

Metallion commented Jan 27, 2017

Why do we need to run docker commands with sudo?

I chose to do it like that because of this: moby/moby#9976

Access to the Docker API is effectively root access. Even lacking --privileged, there are numerous mechanisms to avoid system policy if one has access to the docker socket or API.

A user being in dockerroot seems to be equivalent to that user having root access. Also we are using the --privileged flag in order to use KVM inside of the container. If we're going that far, I thought it was better to be clear that we're running with elevated rights by using sudo.

If there is a good reason not to use sudo despite this, I'm ready to learn. :)

@unakatsuo
Copy link
Contributor

They provides --device and --cap-add for security control similar to lxc. We can explore them later.

@Metallion
Copy link
Contributor Author

Yeah, I know about those. I'll make an issue to add their use later. Thanks for the review. ^_^

@Metallion Metallion merged commit 74efd6c into master Jan 27, 2017
@Metallion Metallion deleted the acceptance-test branch January 27, 2017 08:31
@Metallion Metallion changed the title Acceptance test Acceptance test environment Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants