-
Notifications
You must be signed in to change notification settings - Fork 21
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
[READY] issue-128 - Adding golden files for template validation on openwrt #129
Conversation
@@ -21,7 +22,7 @@ wired: | |||
networks: | |||
# interface names cant have special characters | |||
- name: 'mgmt' | |||
ifname: 'eth1.103 eth1.503' | |||
ifname: 'eth1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this in the example so when Im building the openwrt imgs I dont have to setup a vlan locally. I usually forget to do that and then spend a bit figuring out why I cant connect
81f8141
to
53181b4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks god. I understand about the ifname in the test environment for now, but let's make sure we change it back and test before the show.
gomplateingnore should probably be *.sw? because if a .swp file exists and vi crashes again on the same file, you get .swo, .swn, ...
@owendelong ya i actually use a completely different Thats a good idea, Ill update the |
Gomplate isnt able to identify files that end in something other than there expected file extension. Renaming the secrets example for openwrt so tests work without the need to create the openwrt.yaml file
53181b4
to
263d00c
Compare
Merging this. Will also capture new gomolate and test.sh into #130 . This looks good @sarcasticadmin thank you! |
@kylerisse thanks! Ill keep an eye out the additions to #130 |
Description of PR
@owendelong @kylerisse @davidelang
Related to: #128
Golden files will now be used to validate the output of
gomplate
for the openwrt configs. Some of the work that makes this possible was just merged into master forgomplate
. Mainly: hairyhenderson/gomplate#468 So Ill be waiting eagerly for a new version to drop. For now it requires building thegomplate
binary directory withgo get
Specific commit that enabled this functionality was: d1873444c90e68b5e8ba7492fb83abd36d7ab0ea
Previous Behavior
No automated testing for generated files
New Behavior
openwrt.yaml.example
toopenwrt-example.yaml
(see commit message).gomplateignore
file to make sure it doesnt incldue.swp
if you have a template open in another windowTests
How was this PR tested?
If it returns 0 then there's not a diff from the
./tmp
dir and your templates match!