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

(PDK-1653) Ensure template have access to metadata during update/convert #883

Merged
merged 1 commit into from
May 20, 2020

Conversation

scotje
Copy link
Contributor

@scotje scotje commented May 19, 2020

No description provided.

@scotje scotje added the bug label May 19, 2020
@scotje scotje added this to the June 2020 milestone May 19, 2020
@scotje scotje requested a review from a team as a code owner May 19, 2020 21:52
@coveralls
Copy link

coveralls commented May 19, 2020

Coverage Status

Coverage increased (+0.001%) to 92.653% when pulling 14680d9 on scotje:1653_module_metadata into da3527c on puppetlabs:master.

@scotje
Copy link
Contributor Author

scotje commented May 19, 2020

cc @DavidS @sanfrancrisko

@DavidS
Copy link
Contributor

DavidS commented May 20, 2020

I've verified that the issue reported is reproducible on current PDK master and that this PR resolves the problem using this test:

 
david@zion:~/git/pdk (1653_module_metadata)$ git diff
diff --git a/spec/acceptance/convert_spec.rb b/spec/acceptance/convert_spec.rb
index 803bcfb..27776ff 100644
--- a/spec/acceptance/convert_spec.rb
+++ b/spec/acceptance/convert_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper_acceptance'
 # Force the modules generated in these specs to use the public template repo to
 # avoid unnecessary changes in the metadata.json during convert (template-url
 # key).
-template_repo = 'https://github.com/puppetlabs/pdk-templates'
+template_repo = 'https://github.com/treydock/pdk-templates'
 pdk_convert_base = "pdk convert --template-url=#{template_repo}"
 
 describe 'pdk convert', module_command: true do
@@ -19,6 +19,11 @@ describe 'pdk convert', module_command: true do
     describe file('convert_report.txt') do
       it { is_expected.not_to be_file }
     end
+
+    describe file('spec/acceptance/nodesets/centos-6.yml') do
+      it { is_expected.to be_file }
+      its(:content) { is_expected.to include("docker_container_name: 'clean_module-el6'") }
+    end
   end
 
   context 'when run with --noop' do

We do not have any use of module_metadata in the moduleroot of the regular templates, so it's not easy to test for this.

@DavidS DavidS merged commit 3d6a310 into puppetlabs:master May 20, 2020
@scotje scotje deleted the 1653_module_metadata branch May 20, 2020 18:15
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