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

Add acceptance tests for git protocols using clone #135

Merged
merged 3 commits into from
May 19, 2014

Conversation

johnduarte
Copy link

The git_clone_protocols_spec.rb will be used to enumerate over the
available protocols for git to use to clone to disk. Support
key files are also included for https/ssl use.

Protocols tested

* file protocol (raw filepath)
* file protocol (file://)
* git protocol (git://)
* http protocol (http://)
* https protocol (https://)
* ssh protocol (ssh://user@host)

TODO: Currently, the ssl cert is not added to the CA on the host.
This causes the git clone to fail because the cert is not trusted
and the client does not proceed with a non-trusted ssl connection.

The git_clone_protocols_spec.rb will be used to enumerate over the
available protocols for git to use to clone to disk. Support
key files are also included for https/ssl use.

Protocols tested

    * file protocol (raw filepath)
    * file protocol (file://)
    * git protocol (git://)
    * http protocol (http://)
    * https protocol (https://)
    * ssh protocol (ssh://user@host)

TODO: Currently, the ssl cert is not added to the CA on the host.
This causes the git clone to fail because the cert is not trusted
and the client does not proceed with a non-trusted ssl connection.
EOS

# Run it twice and test for idempotency
on(host,apply_manifest(pp, :catch_failures => true))
Copy link

Choose a reason for hiding this comment

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

These should be apply_manifest_on(host, pp, :catch_failures => true)

Copy link

Choose a reason for hiding this comment

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

Or if there is only a default host, apply_manifest(pp, :catch_failures => true)

host.execute('ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N ""')

# copy public key to authorized_keys
host.execute('cat /root/.ssh/id_rsa.pub >> /home/testuser/.ssh/authorized_keys')
Copy link

Choose a reason for hiding this comment

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

Is this different than on(host, ...)? If we only have one default host, you can use shell()

apenney pushed a commit that referenced this pull request May 19, 2014
Add acceptance tests for git protocols using clone
@apenney apenney merged commit 97e8b02 into puppetlabs:master May 19, 2014
@johnduarte johnduarte deleted the add_protocol_acceptance_tests branch May 19, 2014 15:51
cegeka-jenkins pushed a commit to cegeka/puppet-vcsrepo that referenced this pull request Jan 3, 2018
…ance_tests

Add acceptance tests for git protocols using clone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants