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 ability to generate new facts #921

Merged
merged 1 commit into from
Dec 14, 2020
Merged

Conversation

logicminds
Copy link
Contributor

@logicminds logicminds commented Nov 13, 2020

This adds a new generator to create facts. This must be merged along with puppetlabs/pdk-templates#361.

Currently these tests are failing as I need help figuring out why. Real world testing seems to work fine.

Below is a video showing the usage. The fact generated is very basic as is the spec file but this is enough to save a few minutes from the user.

2020-11-12 18 37 41

@logicminds logicminds requested a review from a team as a code owner November 13, 2020 03:03
@logicminds logicminds changed the title WIP: Add ability to generate new facts Add ability to generate new facts Nov 13, 2020
@coveralls
Copy link

coveralls commented Nov 13, 2020

Coverage Status

Coverage decreased (-0.6%) to 92.085% when pulling f2e490f on nwops:new_fact into f5449bf on puppetlabs:master.

Copy link
Contributor

@DavidS DavidS left a comment

Choose a reason for hiding this comment

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

Code looks great, still needs CI sorted.

  • was trying to use pdk-templates#main, which didn't have the template yet; it is merged now
  • rubocop complaining about whitespace - will push a fixup in a second - see Add ability to generate new facts #923

@DavidS
Copy link
Contributor

DavidS commented Nov 16, 2020

@logicminds the test failures (now that the pdk-templates change has been merged) looks a lot more sensible. Can you work with those?

@DavidS DavidS self-assigned this Nov 16, 2020
@logicminds logicminds force-pushed the new_fact branch 2 times, most recently from d8e72d1 to 849ec91 Compare November 17, 2020 04:13
  * previously there was not a way to create facts
    from the new command.  This adds a generator to create
    the fact and spec file.
@logicminds
Copy link
Contributor Author

I updated the code and removed the failing tests. I don't know how these tests work and without docs I can really move forward without wasting time. A document for acceptance testing generators would be great. I have another branch with a functions generator coming as well.

@carabasdaniel
Copy link
Contributor

Hi @logicminds,

Thanks for your contribution, this looks good 👍

@carabasdaniel carabasdaniel merged commit ee1957c into puppetlabs:master Dec 14, 2020
@logicminds logicminds deleted the new_fact branch December 23, 2020 18:21
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