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
toxification of functional tests #456
Conversation
Signed-off-by: Alfredo Deza <adeza@redhat.com>
vagrant up --no-provision --provider=$VAGRANT_PROVIDER | ||
bash $TOXINIDIR/tests/scripts/generate_ssh_config.sh $CEPH_ANSIBLE_SCENARIO_PATH | ||
|
||
ansible-playbook -vv -i $CEPH_ANSIBLE_SCENARIO_PATH/hosts $TOXINIDIR/site-docker.yml.sample --extra-vars="fetch_directory=$CEPH_ANSIBLE_SCENARIO_PATH/fetch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
site-docker.yml.sample
is in $CEPH_ANSIBLE_SCENARIO_PATH
not $TOXINIDIR
|
||
ansible-playbook -vv -i $CEPH_ANSIBLE_SCENARIO_PATH/hosts $TOXINIDIR/site-docker.yml.sample --extra-vars="fetch_directory=$CEPH_ANSIBLE_SCENARIO_PATH/fetch" | ||
|
||
ansible-playbook -vv -i $CEPH_ANSIBLE_SCENARIO_PATH/hosts $TOXINIDIR/tests/functional/setup.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue here, incorrect path to setup.yml
.
|
||
ansible-playbook -vv -i $CEPH_ANSIBLE_SCENARIO_PATH/hosts $TOXINIDIR/tests/functional/setup.yml | ||
|
||
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory=$CEPH_ANSIBLE_SCENARIO_PATH/hosts $TOXINIDIR/tests/functional/tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue here, incorrect path to the tests directory.
# only available for ansible >= 2.2 | ||
ANSIBLE_STDOUT_CALLBACK = debug | ||
centos7_cluster: CEPH_ANSIBLE_SCENARIO_PATH = {toxinidir}/ceph-ansible/tests/functional/centos/7/docker-cluster | ||
xenial_cluster: CEPH_ANSIBLE_SCENARIO_PATH = {toxinidir}/ceph-ansible/tests/functional/ubuntu/xenial/docker-cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is not an ubuntu/xenial/docker-cluster
testing scenario in ceph-ansible. I'm guessing we'll need to use the same scenario from centos/7/docker-cluster
but tell it to use a different image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, correct. I didn't think it would be an issue to just have it defined already
|
||
# vars | ||
################################################################################# | ||
ANSIBLE_SSH_ARGS = -F $CEPH_ANSIBLE_SCENARIO_PATH/vagrant_ssh_config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does ansible actually respect ANSIBLE_SSH_ARGS
when it's defined here?
ceph_ansible2.1: CEPH_ANSIBLE_BRANCH = stable-2.1 | ||
|
||
deps= | ||
ansible==2.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need to install the test requirements.txt
from ceph-ansible here? If not we won't get testinfra installed or pytest. Or I suppose you could just define them here directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't because ceph-ansible is not checked out yet at this point, so that would mean it would need to assume the right dependencies of ceph-ansible, with the possibility of them getting out of sync. That is why the dependencies are installed in tox.sh
Signed-off-by: Alfredo Deza <adeza@redhat.com>
f3bfe30
to
211021e
Compare
Signed-off-by: Alfredo Deza <adeza@redhat.com>
Signed-off-by: Alfredo Deza <adeza@redhat.com>
There is still a bit of work here to have ceph-ansible deploy the images we build as part of the process, but I can take on that work and submit a new PR for it. |
This is an initial take on harnessing the functional testing from ceph-ansible in ceph-docker.
This will greatly simplify the setup, validation, and teardown of the environment since ceph-ansible already has a way to do all those, including the needed support for docker itself.
For this to work it will need ceph-ansible changes to allow consuming a dev image that
build_imgs.sh
will create, and changes to ceph-build to call tox