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

Change proxy's configuration file to be consistent with other config files in apt.conf.d #283

Merged
merged 1 commit into from
Apr 12, 2014

Conversation

johanfleury
Copy link

No description provided.

@daenney
Copy link

daenney commented Apr 8, 2014

This needs tests.

@johanfleury
Copy link
Author

I deleted my commit and created a new one with updated test files.

I'm sorry if I made wrong, I'm new to git and github.

@daenney
Copy link

daenney commented Apr 11, 2014

I'm okay with this but I do see one issue. Since we're now changing the filename we're not throwing away the old file we've written. If those two happen to diverge it will now depend on the ordering that those preferences are parsed which of the two will be in effect. This will likely lead to confusion.

As such, your commit should probably not only change the name but also explicitly put an ensure => absent, on the old file.

@johanfleury
Copy link
Author

Thank you for the answer.

I pushed a new commit that ensure apt.conf.d/proxy is absent in any case. Is this ok for you ?

@daenney
Copy link

daenney commented Apr 11, 2014

Almost! Sorry for being so nit-picky but because this is an officially supported module we need two sets of tests to pass. You fixed the rspec tests but now we still have the acceptance/beaker tests to worry about.

As you can see here: /~https://github.com/johanfleury/puppetlabs-apt/blob/master/spec/acceptance/apt_spec.rb#L78 there's another spec that checks for proxy instead of 01proxy. I'll basically need the same thing from you, validate that you're now writing 01proxy and ensure that the old proxy file does not exist.

The code should look like this:

    describe file('/etc/apt/apt.conf.d/01proxy') do
      it { should be_file }
      it { should contain 'Acquire::http::Proxy "http://localhost:7042\";' }
    end
    describe file('/etc/apt/apt.conf.d/proxy') do
      it { should_not be_file }
    end

@johanfleury
Copy link
Author

Your project, your rules :)

I pushed a new commit.

@daenney
Copy link

daenney commented Apr 11, 2014

Last one, I promise. In order to keep the history nice and clean I'd like you to squash these commits into one with the help of git's rebase command. There's an easy to follow guide from Github over here: https://help.github.com/articles/interactive-rebase

Once you've squashed the commits into 1 you need to force-push the change out with git push -f. Usually people won't like it when you do that on master. Since your Pull Request is coming from master beware that you can't commit to master until we've merged this as doing so will cause those commits to show up here.

For future reference, this might help and explains the general workflow: http://gun.io/blog/how-to-github-fork-branch-and-pull-request/

This commit changes the proxy file name to be more consistent with other files
in `apt.conf.d`. The old file (`apt.conf.d/proxy`) is removed.

Tests has been updated.
@johanfleury
Copy link
Author

I made rebase as you asked. I also made a better commit message.

Thank a lot for your help. I'll try to make better pull request next times.

@daenney
Copy link

daenney commented Apr 12, 2014

Thanks for bearing with me!

@apenney ping merge!

apenney pushed a commit that referenced this pull request Apr 12, 2014
Change proxy's configuration file to be consistent with other config files in apt.conf.d
@apenney apenney merged commit 81a3f9d into puppetlabs:master Apr 12, 2014
@apenney
Copy link

apenney commented Apr 12, 2014

And merged, thanks for the PR!

@LukasAud LukasAud added the bugfix label Jun 7, 2023
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