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

(maint) Create puppetlabs.testutils namespace #871

Merged
merged 6 commits into from Jan 27, 2016

Conversation

@haus
Copy link
Contributor

haus commented Jan 21, 2016

Several tests reuse or redefine several functions that help in
interacting with puppet catalogs, so this commit collects them in a
generic namespace for reuse. Tests that depended on the old functions
are updated to use the new ones.

(count (filter #(catalog-contains? % resource-type resource-title) catalogs)))

(schema/defn ^:always-validate with-puppet-conf-files
"Test fixture; Accepts a map with the following characteristics:

This comment has been minimized.

Copy link
@MSLilah

MSLilah Jan 21, 2016

Contributor

The indentation here is off

@@ -23,32 +22,20 @@
[puppetlabs.services.protocols.request-handler :as handler]
[puppetlabs.services.request-handler.request-handler-core :as handler-core]
[puppetlabs.ssl-utils.core :as ssl-utils]
[puppetlabs.kitchensink.testutils :as ks-testutils]))
[puppetlabs.kitchensink.testutils :as ks-testutils]
[puppetlabs.testutils :as testutils :refer

This comment has been minimized.

Copy link
@MSLilah

MSLilah Jan 21, 2016

Contributor

The impression I've gotten is that we want to avoid using :refer unless we're referring things from the namespace we're explicitly testing to make it more clear where things are coming from (although I may be totally wrong on that). Saying that, we're fairly inconsistent about when we do and don't use :refer, so I'm fine with leaving these :refers as-is.

This comment has been minimized.

Copy link
@haus

haus Jan 21, 2016

Author Contributor

Yea I wasn't really sure what our best practice was there. I'm fine either way.

@MSLilah

This comment has been minimized.

Copy link
Contributor

MSLilah commented Jan 21, 2016

👏 👍

@@ -0,0 +1,133 @@
(ns puppetlabs.testutils

This comment has been minimized.

Copy link
@cprice404

cprice404 Jan 22, 2016

This namespace might be one touch too generic :) Maybe puppetlabs.puppetserver.testutils? Since this code will end up in our test jar and be accessible to other projects, seems like it might be best to make sure the namespace at least includes the info about where it came from.

This comment has been minimized.

Copy link
@haus

haus Jan 22, 2016

Author Contributor

Oh good call.

@cprice404

This comment has been minimized.

Copy link

cprice404 commented Jan 22, 2016

This is awesome, thanks a ton for doing it. +1 other than possible namespace rename.

@haus

This comment has been minimized.

Copy link
Contributor Author

haus commented Jan 22, 2016

Rebased and renamed namespace to puppetlabs.puppetserver.testutils.

@MSLilah

This comment has been minimized.

Copy link
Contributor

MSLilah commented Jan 26, 2016

Looks like this is going to need another rebase. Travis also failed on Java 8 but it looks transient, so I re-ran the build.

@haus

This comment has been minimized.

Copy link
Contributor Author

haus commented Jan 26, 2016

Yup...I'll rebase this afternoon.

haus added 5 commits Jan 21, 2016
Several tests reuse or redefine several functions that help in
interacting with puppet catalogs, so this commit collects them in a
generic namespace for reuse. Tests that depended on the old functions
are updated to use the new ones.
@haus

This comment has been minimized.

Copy link
Contributor Author

haus commented Jan 27, 2016

rebased...running tests locally and eager to see what travis has to say.

@haus

This comment has been minimized.

Copy link
Contributor Author

haus commented Jan 27, 2016

(local tests pass for me on this)

@haus

This comment has been minimized.

Copy link
Contributor Author

haus commented Jan 27, 2016

oh hey. https://tickets.puppetlabs.com/browse/SERVER-709 looks related to this.

@cprice404

This comment has been minimized.

Copy link

cprice404 commented Jan 27, 2016

tests passed for me locally.

cprice404 pushed a commit that referenced this pull request Jan 27, 2016
(maint) Create puppetlabs.testutils namespace
@cprice404 cprice404 merged commit a919094 into puppetlabs:master Jan 27, 2016
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.