From 351db42564f78976ffd979f81c8e13a03c45093b Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Wed, 31 Jul 2024 12:02:01 -0700 Subject: [PATCH] Support arrays of deferred parameter values If an `exec` resource's `environment` parameter was specified as an array of values, where at least one of the values was deferred, then validation failed with: undefined method `=~' for # true, + environment => [ + Deferred('inline_epp', ['ADMIN_PASSWORD=<%= $password %>', { 'password' => $password }]), + ], + } + END + apply.command_line.args = ['-e', manifest] + expect { + apply.run + }.to exit_with(0) + .and output(%r{Exec\[/usr/bin/echo \$ADMIN_PASSWORD\]/returns: opensesame}).to_stdout + end + it "applies deferred sensitive file content" do manifest = <<~END file { '#{deferred_file}':