@ -153,7 +153,32 @@ func TestResourceProvider_windowsCreateConfigFiles(t *testing.T) {
} ,
} ,
"Attributes" : {
"String Attributes" : {
Config : testConfig ( t , map [ string ] interface { } {
"attributes" : ` { "key1": { "subkey1": { "subkey2a":["val1","val2","val3"], ` +
` "subkey2b": { "subkey3":"value3"}}},"key2":"value2"} ` ,
"node_name" : "nodename1" ,
"run_list" : [ ] interface { } { "cookbook::recipe" } ,
"secret_key_path" : "test-fixtures/encrypted_data_bag_secret" ,
"server_url" : "https://chef.local" ,
"validation_client_name" : "validator" ,
"validation_key_path" : "test-fixtures/validator.pem" ,
} ) ,
Commands : map [ string ] bool {
fmt . Sprintf ( "cmd /c if not exist %q mkdir %q" , windowsConfDir , windowsConfDir ) : true ,
} ,
Uploads : map [ string ] string {
windowsConfDir + "/client.rb" : defaultWindowsClientConf ,
windowsConfDir + "/encrypted_data_bag_secret" : "SECRET-KEY-FILE" ,
windowsConfDir + "/validation.pem" : "VALIDATOR-PEM-FILE" ,
windowsConfDir + "/first-boot.json" : ` { "key1": { "subkey1": { "subkey2a":["val1","val2","val3"], ` +
` "subkey2b": { "subkey3":"value3"}}},"key2":"value2","run_list":["cookbook::recipe"]} ` ,
} ,
} ,
"Map Attributes" : {
Config : testConfig ( t , map [ string ] interface { } {
"attributes" : [ ] map [ string ] interface { } {
map [ string ] interface { } {