fix errors
This commit is contained in:
parent
cd58da773c
commit
090248fab1
|
@ -20,6 +20,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "validator.pem",
|
||||
"secret_key_path": "encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -37,6 +38,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "validator.pem",
|
||||
"secret_key_path": "encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -55,6 +57,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "validator.pem",
|
||||
"secret_key_path": "encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -73,6 +76,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "validator.pem",
|
||||
"secret_key_path": "encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -92,6 +96,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "validator.pem",
|
||||
"secret_key_path": "encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -112,6 +117,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "validator.pem",
|
||||
"secret_key_path": "encrypted_data_bag_secret",
|
||||
"version": "11.18.6",
|
||||
}),
|
||||
|
||||
|
@ -158,6 +164,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "test-fixtures/validator.pem",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -170,6 +177,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
|
|||
|
||||
Uploads: map[string]string{
|
||||
linuxConfDir + "/validation.pem": "VALIDATOR-PEM-FILE",
|
||||
linuxConfDir + "/encrypted_data_bag_secret":"SECRET-KEY-FILE",
|
||||
linuxConfDir + "/ohai/hints/ohaihint.json": "OHAI-HINT-FILE",
|
||||
linuxConfDir + "/client.rb": defaultLinuxClientConf,
|
||||
linuxConfDir + "/first-boot.json": `{"run_list":["cookbook::recipe"]}`,
|
||||
|
@ -184,6 +192,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "test-fixtures/validator.pem",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -192,6 +201,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
|
|||
|
||||
Uploads: map[string]string{
|
||||
linuxConfDir + "/validation.pem": "VALIDATOR-PEM-FILE",
|
||||
linuxConfDir + "/encrypted_data_bag_secret":"SECRET-KEY-FILE",
|
||||
linuxConfDir + "/client.rb": defaultLinuxClientConf,
|
||||
linuxConfDir + "/first-boot.json": `{"run_list":["cookbook::recipe"]}`,
|
||||
},
|
||||
|
@ -208,6 +218,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "test-fixtures/validator.pem",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -216,6 +227,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
|
|||
|
||||
Uploads: map[string]string{
|
||||
linuxConfDir + "/validation.pem": "VALIDATOR-PEM-FILE",
|
||||
linuxConfDir + "/encrypted_data_bag_secret":"SECRET-KEY-FILE",
|
||||
linuxConfDir + "/client.rb": proxyLinuxClientConf,
|
||||
linuxConfDir + "/first-boot.json": `{"run_list":["cookbook::recipe"]}`,
|
||||
},
|
||||
|
@ -250,6 +262,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "test-fixtures/validator.pem",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -258,6 +271,7 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
|
|||
|
||||
Uploads: map[string]string{
|
||||
linuxConfDir + "/validation.pem": "VALIDATOR-PEM-FILE",
|
||||
linuxConfDir + "/encrypted_data_bag_secret": "SECRET-KEY-FILE",
|
||||
linuxConfDir + "/client.rb": defaultLinuxClientConf,
|
||||
linuxConfDir + "/first-boot.json": `{"key1":{"subkey1":{"subkey2a":["val1","val2","val3"],` +
|
||||
`"subkey2b":{"subkey3":"value3"}}},"key2":"value2","run_list":["cookbook::recipe"]}`,
|
||||
|
|
|
@ -69,7 +69,7 @@ func TestResourceProvider_runChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "test-fixtures/validator.pem",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
ConfDir: linuxConfDir,
|
||||
|
@ -87,7 +87,7 @@ func TestResourceProvider_runChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "test-fixtures/validator.pem",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
ConfDir: linuxConfDir,
|
||||
|
@ -106,7 +106,7 @@ func TestResourceProvider_runChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "test-fixtures/validator.pem",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
ConfDir: windowsConfDir,
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
SECRET-KEY-FILE
|
|
@ -22,6 +22,7 @@ func TestResourceProvider_windowsInstallChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "validator.pem",
|
||||
"secret_key_path": "encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -42,6 +43,7 @@ func TestResourceProvider_windowsInstallChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "validator.pem",
|
||||
"secret_key_path": "encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -60,6 +62,7 @@ func TestResourceProvider_windowsInstallChefClient(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "validator.pem",
|
||||
"secret_key_path": "encrypted_data_bag_secret",
|
||||
"version": "11.18.6",
|
||||
}),
|
||||
|
||||
|
@ -109,6 +112,7 @@ func TestResourceProvider_windowsCreateConfigFiles(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "test-fixtures/validator.pem",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -120,6 +124,7 @@ func TestResourceProvider_windowsCreateConfigFiles(t *testing.T) {
|
|||
|
||||
Uploads: map[string]string{
|
||||
windowsConfDir + "/validation.pem": "VALIDATOR-PEM-FILE",
|
||||
windowsConfDir + "/encrypted_data_bag_secret":"SECRET-KEY-FILE",
|
||||
windowsConfDir + "/ohai/hints/ohaihint.json": "OHAI-HINT-FILE",
|
||||
windowsConfDir + "/client.rb": defaultWindowsClientConf,
|
||||
windowsConfDir + "/first-boot.json": `{"run_list":["cookbook::recipe"]}`,
|
||||
|
@ -136,6 +141,7 @@ func TestResourceProvider_windowsCreateConfigFiles(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "test-fixtures/validator.pem",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -144,6 +150,7 @@ func TestResourceProvider_windowsCreateConfigFiles(t *testing.T) {
|
|||
|
||||
Uploads: map[string]string{
|
||||
windowsConfDir + "/validation.pem": "VALIDATOR-PEM-FILE",
|
||||
windowsConfDir + "/encrypted_data_bag_secret":"SECRET-KEY-FILE",
|
||||
windowsConfDir + "/client.rb": proxyWindowsClientConf,
|
||||
windowsConfDir + "/first-boot.json": `{"run_list":["cookbook::recipe"]}`,
|
||||
},
|
||||
|
@ -177,6 +184,7 @@ func TestResourceProvider_windowsCreateConfigFiles(t *testing.T) {
|
|||
"server_url": "https://chef.local",
|
||||
"validation_client_name": "validator",
|
||||
"validation_key_path": "test-fixtures/validator.pem",
|
||||
"secret_key_path": "test-fixtures/encrypted_data_bag_secret",
|
||||
}),
|
||||
|
||||
Commands: map[string]bool{
|
||||
|
@ -185,6 +193,7 @@ func TestResourceProvider_windowsCreateConfigFiles(t *testing.T) {
|
|||
|
||||
Uploads: map[string]string{
|
||||
windowsConfDir + "/validation.pem": "VALIDATOR-PEM-FILE",
|
||||
windowsConfDir + "/encrypted_data_bag_secret":"SECRET-KEY-FILE",
|
||||
windowsConfDir + "/client.rb": defaultWindowsClientConf,
|
||||
windowsConfDir + "/first-boot.json": `{"key1":{"subkey1":{"subkey2a":["val1","val2","val3"],` +
|
||||
`"subkey2b":{"subkey3":"value3"}}},"key2":"value2","run_list":["cookbook::recipe"]}`,
|
||||
|
|
Loading…
Reference in New Issue