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

move testing deps to integration group in berksfile #123

Merged
merged 1 commit into from
Oct 27, 2016

Conversation

vjeffrey
Copy link

addresses issues from #121

i think? is this what you meant @jeremymv2 @chris-rock ??

cookbook 'yum'
group :integration do
cookbook 'apt'
cookbook 'yum'
Copy link
Contributor

@jeremymv2 jeremymv2 Oct 26, 2016

Choose a reason for hiding this comment

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

You shouldn't have to add dependencies for apt and yum cookbooks since there is no custom repo to set up to get the 'git' package. The 'git' cookbook will handle those for you, if needed 😄

Copy link
Author

Choose a reason for hiding this comment

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

oooh, i missed that! thank youu!!! i'll update

Copy link
Author

Choose a reason for hiding this comment

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

so, taking out all the references to apt and yum, and doing a kitchen destroy and kitchen converge got me

Recipe: git::package
  * git_client[default] action install
    * apt_package[default :create git] action install
      * No candidate version available for git
      ================================================================================
      Error executing action `install` on resource 'apt_package[default :create git]'
      ================================================================================

      Chef::Exceptions::Package
      -------------------------
      No candidate version available for git

Copy link
Author

Choose a reason for hiding this comment

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

any ideas @jeremymv2 ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that's because these particular images need an apt-get update run, which simply downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages and their dependencies.

Here's the modified platform section with - RUN /usr/bin/apt-get update - it's similar to the same section for the inspec project. Once I changed this for ubuntu 12, 14, 15 and debian8 they all converged fine.

platforms:
- name: ubuntu-12.04
  driver:
    image: ubuntu:12.04
    intermediate_instructions:
    - RUN /usr/bin/apt-get update
- name: ubuntu-14.04
  driver:
    image: ubuntu:14.04
    intermediate_instructions:
    - RUN /usr/bin/apt-get update
- name: ubuntu-15.10
  driver:
    image: ubuntu:15.10
    intermediate_instructions:
    - RUN /usr/bin/apt-get update
    pid_one_command: /bin/systemd
- name: centos-6.6
  driver:
    image: centos:6.6
- name: centos-6.7
  driver:
    image: centos:6.7
    intermediate_instructions:
      - RUN yum install -y initscripts
- name: centos-7
  driver:
    image: centos:7
    pid_one_command: /usr/lib/systemd/systemd
- name: oracle-6.6
  driver:
    image: oraclelinux:6.6
- name: oracle-6.7
  driver:
    image: oraclelinux:6.7
- name: oracle-7.1
  driver:
    image: oraclelinux:7.1
    pid_one_command: /usr/lib/systemd/systemd
- name: debian-7
  driver:
    image: debian:7
    intermediate_instructions:
    - RUN /usr/bin/apt-get update
    - RUN /usr/bin/apt-get install -y procps
- name: debian-8
  driver:
    image: debian:8
    intermediate_instructions:
    - RUN /usr/bin/apt-get update
    pid_one_command: /bin/systemd

Copy link
Author

Choose a reason for hiding this comment

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

cool, thanks for looking into that :) i'll update the pr

@@ -62,7 +62,7 @@ suites:
run_list:
- recipe[apt]
- recipe[yum]
- recipe[audit::prep]
- recipe[git::default]
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't need

 - recipe[apt]
 - recipe[yum]

If there are more test fixtures other than the 'git' binary that need to be added over time, then it's perhaps better to add those into a separate fixture cookbook under the tests directory then reference its default recipe here, but recipe[git::default] is fine in my opinion for now.

@vjeffrey vjeffrey force-pushed the testing-integration branch from 5d859e6 to 99430be Compare October 26, 2016 23:07
@chris-rock
Copy link
Contributor

+1 thanks @vjeffrey and @jeremymv2 This looks much better.

@chris-rock chris-rock merged commit 776fcfa into master Oct 27, 2016
@chris-rock chris-rock deleted the testing-integration branch October 27, 2016 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants