From 97a258ae69d90f6e44c0a3b60e37c64f9772bbff Mon Sep 17 00:00:00 2001 From: Miah Johnson Date: Wed, 11 Sep 2019 15:56:29 -0700 Subject: [PATCH 1/9] Use a more obvious directory structure for kitchen testing Signed-off-by: Miah Johnson --- .../cookbooks/os_prepare/attributes/default.rb | 0 .../cookbooks/os_prepare/files/empty.iso | Bin .../cookbooks/os_prepare/files/example.csv | 0 .../cookbooks/os_prepare/files/example.ini | 0 .../cookbooks/os_prepare/files/example.json | 0 .../cookbooks/os_prepare/files/example.toml | 0 .../cookbooks/os_prepare/files/example.xml | 0 .../cookbooks/os_prepare/files/example.yml | 0 .../cookbooks/os_prepare/files/httpd.conf | 0 test/{ => kitchen}/cookbooks/os_prepare/metadata.rb | 0 .../os_prepare/recipes/_runit_service_centos.rb | 0 .../os_prepare/recipes/_upstart_service_centos.rb | 0 .../cookbooks/os_prepare/recipes/apache.rb | 0 .../cookbooks/os_prepare/recipes/apt.rb | 0 .../cookbooks/os_prepare/recipes/auditctl.rb | 0 .../cookbooks/os_prepare/recipes/default.rb | 0 .../cookbooks/os_prepare/recipes/dh_params.rb | 0 .../cookbooks/os_prepare/recipes/docker_host.rb | 0 .../cookbooks/os_prepare/recipes/file.rb | 0 .../cookbooks/os_prepare/recipes/find_files.rb | 0 .../cookbooks/os_prepare/recipes/iis.rb | 0 .../cookbooks/os_prepare/recipes/iptables.rb | 0 .../os_prepare/recipes/json_yaml_csv_ini_xml.rb | 0 .../cookbooks/os_prepare/recipes/mount.rb | 0 .../cookbooks/os_prepare/recipes/os_env.rb | 0 .../cookbooks/os_prepare/recipes/package.rb | 0 .../cookbooks/os_prepare/recipes/postgres.rb | 0 .../cookbooks/os_prepare/recipes/registry_key.rb | 0 .../cookbooks/os_prepare/recipes/service.rb | 0 .../cookbooks/os_prepare/recipes/ssh.rb | 0 .../cookbooks/os_prepare/recipes/x509.rb | 0 .../os_prepare/templates/sv-default-svlog-run.erb | 0 32 files changed, 0 insertions(+), 0 deletions(-) rename test/{ => kitchen}/cookbooks/os_prepare/attributes/default.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/files/empty.iso (100%) rename test/{ => kitchen}/cookbooks/os_prepare/files/example.csv (100%) rename test/{ => kitchen}/cookbooks/os_prepare/files/example.ini (100%) rename test/{ => kitchen}/cookbooks/os_prepare/files/example.json (100%) rename test/{ => kitchen}/cookbooks/os_prepare/files/example.toml (100%) rename test/{ => kitchen}/cookbooks/os_prepare/files/example.xml (100%) rename test/{ => kitchen}/cookbooks/os_prepare/files/example.yml (100%) rename test/{ => kitchen}/cookbooks/os_prepare/files/httpd.conf (100%) rename test/{ => kitchen}/cookbooks/os_prepare/metadata.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/_runit_service_centos.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/_upstart_service_centos.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/apache.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/apt.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/auditctl.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/default.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/dh_params.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/docker_host.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/file.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/find_files.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/iis.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/iptables.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/json_yaml_csv_ini_xml.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/mount.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/os_env.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/package.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/postgres.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/registry_key.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/service.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/ssh.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/recipes/x509.rb (100%) rename test/{ => kitchen}/cookbooks/os_prepare/templates/sv-default-svlog-run.erb (100%) diff --git a/test/cookbooks/os_prepare/attributes/default.rb b/test/kitchen/cookbooks/os_prepare/attributes/default.rb similarity index 100% rename from test/cookbooks/os_prepare/attributes/default.rb rename to test/kitchen/cookbooks/os_prepare/attributes/default.rb diff --git a/test/cookbooks/os_prepare/files/empty.iso b/test/kitchen/cookbooks/os_prepare/files/empty.iso similarity index 100% rename from test/cookbooks/os_prepare/files/empty.iso rename to test/kitchen/cookbooks/os_prepare/files/empty.iso diff --git a/test/cookbooks/os_prepare/files/example.csv b/test/kitchen/cookbooks/os_prepare/files/example.csv similarity index 100% rename from test/cookbooks/os_prepare/files/example.csv rename to test/kitchen/cookbooks/os_prepare/files/example.csv diff --git a/test/cookbooks/os_prepare/files/example.ini b/test/kitchen/cookbooks/os_prepare/files/example.ini similarity index 100% rename from test/cookbooks/os_prepare/files/example.ini rename to test/kitchen/cookbooks/os_prepare/files/example.ini diff --git a/test/cookbooks/os_prepare/files/example.json b/test/kitchen/cookbooks/os_prepare/files/example.json similarity index 100% rename from test/cookbooks/os_prepare/files/example.json rename to test/kitchen/cookbooks/os_prepare/files/example.json diff --git a/test/cookbooks/os_prepare/files/example.toml b/test/kitchen/cookbooks/os_prepare/files/example.toml similarity index 100% rename from test/cookbooks/os_prepare/files/example.toml rename to test/kitchen/cookbooks/os_prepare/files/example.toml diff --git a/test/cookbooks/os_prepare/files/example.xml b/test/kitchen/cookbooks/os_prepare/files/example.xml similarity index 100% rename from test/cookbooks/os_prepare/files/example.xml rename to test/kitchen/cookbooks/os_prepare/files/example.xml diff --git a/test/cookbooks/os_prepare/files/example.yml b/test/kitchen/cookbooks/os_prepare/files/example.yml similarity index 100% rename from test/cookbooks/os_prepare/files/example.yml rename to test/kitchen/cookbooks/os_prepare/files/example.yml diff --git a/test/cookbooks/os_prepare/files/httpd.conf b/test/kitchen/cookbooks/os_prepare/files/httpd.conf similarity index 100% rename from test/cookbooks/os_prepare/files/httpd.conf rename to test/kitchen/cookbooks/os_prepare/files/httpd.conf diff --git a/test/cookbooks/os_prepare/metadata.rb b/test/kitchen/cookbooks/os_prepare/metadata.rb similarity index 100% rename from test/cookbooks/os_prepare/metadata.rb rename to test/kitchen/cookbooks/os_prepare/metadata.rb diff --git a/test/cookbooks/os_prepare/recipes/_runit_service_centos.rb b/test/kitchen/cookbooks/os_prepare/recipes/_runit_service_centos.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/_runit_service_centos.rb rename to test/kitchen/cookbooks/os_prepare/recipes/_runit_service_centos.rb diff --git a/test/cookbooks/os_prepare/recipes/_upstart_service_centos.rb b/test/kitchen/cookbooks/os_prepare/recipes/_upstart_service_centos.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/_upstart_service_centos.rb rename to test/kitchen/cookbooks/os_prepare/recipes/_upstart_service_centos.rb diff --git a/test/cookbooks/os_prepare/recipes/apache.rb b/test/kitchen/cookbooks/os_prepare/recipes/apache.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/apache.rb rename to test/kitchen/cookbooks/os_prepare/recipes/apache.rb diff --git a/test/cookbooks/os_prepare/recipes/apt.rb b/test/kitchen/cookbooks/os_prepare/recipes/apt.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/apt.rb rename to test/kitchen/cookbooks/os_prepare/recipes/apt.rb diff --git a/test/cookbooks/os_prepare/recipes/auditctl.rb b/test/kitchen/cookbooks/os_prepare/recipes/auditctl.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/auditctl.rb rename to test/kitchen/cookbooks/os_prepare/recipes/auditctl.rb diff --git a/test/cookbooks/os_prepare/recipes/default.rb b/test/kitchen/cookbooks/os_prepare/recipes/default.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/default.rb rename to test/kitchen/cookbooks/os_prepare/recipes/default.rb diff --git a/test/cookbooks/os_prepare/recipes/dh_params.rb b/test/kitchen/cookbooks/os_prepare/recipes/dh_params.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/dh_params.rb rename to test/kitchen/cookbooks/os_prepare/recipes/dh_params.rb diff --git a/test/cookbooks/os_prepare/recipes/docker_host.rb b/test/kitchen/cookbooks/os_prepare/recipes/docker_host.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/docker_host.rb rename to test/kitchen/cookbooks/os_prepare/recipes/docker_host.rb diff --git a/test/cookbooks/os_prepare/recipes/file.rb b/test/kitchen/cookbooks/os_prepare/recipes/file.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/file.rb rename to test/kitchen/cookbooks/os_prepare/recipes/file.rb diff --git a/test/cookbooks/os_prepare/recipes/find_files.rb b/test/kitchen/cookbooks/os_prepare/recipes/find_files.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/find_files.rb rename to test/kitchen/cookbooks/os_prepare/recipes/find_files.rb diff --git a/test/cookbooks/os_prepare/recipes/iis.rb b/test/kitchen/cookbooks/os_prepare/recipes/iis.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/iis.rb rename to test/kitchen/cookbooks/os_prepare/recipes/iis.rb diff --git a/test/cookbooks/os_prepare/recipes/iptables.rb b/test/kitchen/cookbooks/os_prepare/recipes/iptables.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/iptables.rb rename to test/kitchen/cookbooks/os_prepare/recipes/iptables.rb diff --git a/test/cookbooks/os_prepare/recipes/json_yaml_csv_ini_xml.rb b/test/kitchen/cookbooks/os_prepare/recipes/json_yaml_csv_ini_xml.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/json_yaml_csv_ini_xml.rb rename to test/kitchen/cookbooks/os_prepare/recipes/json_yaml_csv_ini_xml.rb diff --git a/test/cookbooks/os_prepare/recipes/mount.rb b/test/kitchen/cookbooks/os_prepare/recipes/mount.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/mount.rb rename to test/kitchen/cookbooks/os_prepare/recipes/mount.rb diff --git a/test/cookbooks/os_prepare/recipes/os_env.rb b/test/kitchen/cookbooks/os_prepare/recipes/os_env.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/os_env.rb rename to test/kitchen/cookbooks/os_prepare/recipes/os_env.rb diff --git a/test/cookbooks/os_prepare/recipes/package.rb b/test/kitchen/cookbooks/os_prepare/recipes/package.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/package.rb rename to test/kitchen/cookbooks/os_prepare/recipes/package.rb diff --git a/test/cookbooks/os_prepare/recipes/postgres.rb b/test/kitchen/cookbooks/os_prepare/recipes/postgres.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/postgres.rb rename to test/kitchen/cookbooks/os_prepare/recipes/postgres.rb diff --git a/test/cookbooks/os_prepare/recipes/registry_key.rb b/test/kitchen/cookbooks/os_prepare/recipes/registry_key.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/registry_key.rb rename to test/kitchen/cookbooks/os_prepare/recipes/registry_key.rb diff --git a/test/cookbooks/os_prepare/recipes/service.rb b/test/kitchen/cookbooks/os_prepare/recipes/service.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/service.rb rename to test/kitchen/cookbooks/os_prepare/recipes/service.rb diff --git a/test/cookbooks/os_prepare/recipes/ssh.rb b/test/kitchen/cookbooks/os_prepare/recipes/ssh.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/ssh.rb rename to test/kitchen/cookbooks/os_prepare/recipes/ssh.rb diff --git a/test/cookbooks/os_prepare/recipes/x509.rb b/test/kitchen/cookbooks/os_prepare/recipes/x509.rb similarity index 100% rename from test/cookbooks/os_prepare/recipes/x509.rb rename to test/kitchen/cookbooks/os_prepare/recipes/x509.rb diff --git a/test/cookbooks/os_prepare/templates/sv-default-svlog-run.erb b/test/kitchen/cookbooks/os_prepare/templates/sv-default-svlog-run.erb similarity index 100% rename from test/cookbooks/os_prepare/templates/sv-default-svlog-run.erb rename to test/kitchen/cookbooks/os_prepare/templates/sv-default-svlog-run.erb From e8ae9012ea9c0cd51cdcbe1a9018cd7319dfdcb7 Mon Sep 17 00:00:00 2001 From: Miah Johnson Date: Wed, 11 Sep 2019 15:57:29 -0700 Subject: [PATCH 2/9] Move inspec-verify kitchen tests into more obvious directory Signed-off-by: Miah Johnson --- .../policies}/default/controls/_debug_spec.rb | 0 .../policies}/default/controls/apache_conf_spec.rb | 0 .../policies}/default/controls/apt_spec.rb | 0 .../policies}/default/controls/audit_spec.rb | 0 .../policies}/default/controls/cmp_matcher_spec.rb | 0 .../policies}/default/controls/csv_spec.rb | 0 .../policies}/default/controls/dh_params_spec.rb | 0 .../policies}/default/controls/docker_spec.rb | 0 .../policies}/default/controls/etc_group_spec.rb | 0 .../policies}/default/controls/file_spec.rb | 0 .../policies}/default/controls/filesystem.rb | 0 .../policies}/default/controls/group_spec.rb | 0 .../policies}/default/controls/iis_site_spec.rb | 0 .../policies}/default/controls/ini_spec.rb | 0 .../policies}/default/controls/ip6tables_spec.rb | 0 .../policies}/default/controls/iptables_spec.rb | 0 .../policies}/default/controls/json_spec.rb | 0 .../policies}/default/controls/kernel_module_spec.rb | 0 .../policies}/default/controls/kernel_parameter_spec.rb | 0 .../policies}/default/controls/matcher_test.rb | 0 .../policies}/default/controls/mount_spec.rb | 0 .../policies}/default/controls/mssql_session_spec.rb | 0 .../policies}/default/controls/os_env_spec.rb | 0 .../{integration => kitchen/policies}/default/controls/os_spec.rb | 0 .../policies}/default/controls/package_spec.rb | 0 .../policies}/default/controls/port_spec.rb | 0 .../policies}/default/controls/postgres_session_spec.rb | 0 .../policies}/default/controls/powershell_spec.rb | 0 .../policies}/default/controls/registry_key_spec.rb | 0 .../policies}/default/controls/secpol_spec.rb | 0 .../policies}/default/controls/security_identifier_spec.rb | 0 .../policies}/default/controls/service_spec.rb | 0 .../policies}/default/controls/toml_spec.rb | 0 .../policies}/default/controls/user_spec.rb | 0 .../policies}/default/controls/vbscript_spec.rb | 0 .../policies}/default/controls/virtualization_spec.rb | 0 .../policies}/default/controls/windows_hotfix_spec.rb | 0 .../policies}/default/controls/windows_task_spec.rb | 0 .../policies}/default/controls/wmi_spec.rb | 0 .../policies}/default/controls/x509_spec.rb | 0 .../policies}/default/controls/xml_spec.rb | 0 .../policies}/default/controls/yaml_spec.rb | 0 test/{integration => kitchen/policies}/default/inspec.yml | 0 43 files changed, 0 insertions(+), 0 deletions(-) rename test/{integration => kitchen/policies}/default/controls/_debug_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/apache_conf_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/apt_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/audit_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/cmp_matcher_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/csv_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/dh_params_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/docker_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/etc_group_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/file_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/filesystem.rb (100%) rename test/{integration => kitchen/policies}/default/controls/group_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/iis_site_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/ini_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/ip6tables_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/iptables_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/json_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/kernel_module_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/kernel_parameter_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/matcher_test.rb (100%) rename test/{integration => kitchen/policies}/default/controls/mount_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/mssql_session_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/os_env_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/os_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/package_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/port_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/postgres_session_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/powershell_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/registry_key_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/secpol_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/security_identifier_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/service_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/toml_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/user_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/vbscript_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/virtualization_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/windows_hotfix_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/windows_task_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/wmi_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/x509_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/xml_spec.rb (100%) rename test/{integration => kitchen/policies}/default/controls/yaml_spec.rb (100%) rename test/{integration => kitchen/policies}/default/inspec.yml (100%) diff --git a/test/integration/default/controls/_debug_spec.rb b/test/kitchen/policies/default/controls/_debug_spec.rb similarity index 100% rename from test/integration/default/controls/_debug_spec.rb rename to test/kitchen/policies/default/controls/_debug_spec.rb diff --git a/test/integration/default/controls/apache_conf_spec.rb b/test/kitchen/policies/default/controls/apache_conf_spec.rb similarity index 100% rename from test/integration/default/controls/apache_conf_spec.rb rename to test/kitchen/policies/default/controls/apache_conf_spec.rb diff --git a/test/integration/default/controls/apt_spec.rb b/test/kitchen/policies/default/controls/apt_spec.rb similarity index 100% rename from test/integration/default/controls/apt_spec.rb rename to test/kitchen/policies/default/controls/apt_spec.rb diff --git a/test/integration/default/controls/audit_spec.rb b/test/kitchen/policies/default/controls/audit_spec.rb similarity index 100% rename from test/integration/default/controls/audit_spec.rb rename to test/kitchen/policies/default/controls/audit_spec.rb diff --git a/test/integration/default/controls/cmp_matcher_spec.rb b/test/kitchen/policies/default/controls/cmp_matcher_spec.rb similarity index 100% rename from test/integration/default/controls/cmp_matcher_spec.rb rename to test/kitchen/policies/default/controls/cmp_matcher_spec.rb diff --git a/test/integration/default/controls/csv_spec.rb b/test/kitchen/policies/default/controls/csv_spec.rb similarity index 100% rename from test/integration/default/controls/csv_spec.rb rename to test/kitchen/policies/default/controls/csv_spec.rb diff --git a/test/integration/default/controls/dh_params_spec.rb b/test/kitchen/policies/default/controls/dh_params_spec.rb similarity index 100% rename from test/integration/default/controls/dh_params_spec.rb rename to test/kitchen/policies/default/controls/dh_params_spec.rb diff --git a/test/integration/default/controls/docker_spec.rb b/test/kitchen/policies/default/controls/docker_spec.rb similarity index 100% rename from test/integration/default/controls/docker_spec.rb rename to test/kitchen/policies/default/controls/docker_spec.rb diff --git a/test/integration/default/controls/etc_group_spec.rb b/test/kitchen/policies/default/controls/etc_group_spec.rb similarity index 100% rename from test/integration/default/controls/etc_group_spec.rb rename to test/kitchen/policies/default/controls/etc_group_spec.rb diff --git a/test/integration/default/controls/file_spec.rb b/test/kitchen/policies/default/controls/file_spec.rb similarity index 100% rename from test/integration/default/controls/file_spec.rb rename to test/kitchen/policies/default/controls/file_spec.rb diff --git a/test/integration/default/controls/filesystem.rb b/test/kitchen/policies/default/controls/filesystem.rb similarity index 100% rename from test/integration/default/controls/filesystem.rb rename to test/kitchen/policies/default/controls/filesystem.rb diff --git a/test/integration/default/controls/group_spec.rb b/test/kitchen/policies/default/controls/group_spec.rb similarity index 100% rename from test/integration/default/controls/group_spec.rb rename to test/kitchen/policies/default/controls/group_spec.rb diff --git a/test/integration/default/controls/iis_site_spec.rb b/test/kitchen/policies/default/controls/iis_site_spec.rb similarity index 100% rename from test/integration/default/controls/iis_site_spec.rb rename to test/kitchen/policies/default/controls/iis_site_spec.rb diff --git a/test/integration/default/controls/ini_spec.rb b/test/kitchen/policies/default/controls/ini_spec.rb similarity index 100% rename from test/integration/default/controls/ini_spec.rb rename to test/kitchen/policies/default/controls/ini_spec.rb diff --git a/test/integration/default/controls/ip6tables_spec.rb b/test/kitchen/policies/default/controls/ip6tables_spec.rb similarity index 100% rename from test/integration/default/controls/ip6tables_spec.rb rename to test/kitchen/policies/default/controls/ip6tables_spec.rb diff --git a/test/integration/default/controls/iptables_spec.rb b/test/kitchen/policies/default/controls/iptables_spec.rb similarity index 100% rename from test/integration/default/controls/iptables_spec.rb rename to test/kitchen/policies/default/controls/iptables_spec.rb diff --git a/test/integration/default/controls/json_spec.rb b/test/kitchen/policies/default/controls/json_spec.rb similarity index 100% rename from test/integration/default/controls/json_spec.rb rename to test/kitchen/policies/default/controls/json_spec.rb diff --git a/test/integration/default/controls/kernel_module_spec.rb b/test/kitchen/policies/default/controls/kernel_module_spec.rb similarity index 100% rename from test/integration/default/controls/kernel_module_spec.rb rename to test/kitchen/policies/default/controls/kernel_module_spec.rb diff --git a/test/integration/default/controls/kernel_parameter_spec.rb b/test/kitchen/policies/default/controls/kernel_parameter_spec.rb similarity index 100% rename from test/integration/default/controls/kernel_parameter_spec.rb rename to test/kitchen/policies/default/controls/kernel_parameter_spec.rb diff --git a/test/integration/default/controls/matcher_test.rb b/test/kitchen/policies/default/controls/matcher_test.rb similarity index 100% rename from test/integration/default/controls/matcher_test.rb rename to test/kitchen/policies/default/controls/matcher_test.rb diff --git a/test/integration/default/controls/mount_spec.rb b/test/kitchen/policies/default/controls/mount_spec.rb similarity index 100% rename from test/integration/default/controls/mount_spec.rb rename to test/kitchen/policies/default/controls/mount_spec.rb diff --git a/test/integration/default/controls/mssql_session_spec.rb b/test/kitchen/policies/default/controls/mssql_session_spec.rb similarity index 100% rename from test/integration/default/controls/mssql_session_spec.rb rename to test/kitchen/policies/default/controls/mssql_session_spec.rb diff --git a/test/integration/default/controls/os_env_spec.rb b/test/kitchen/policies/default/controls/os_env_spec.rb similarity index 100% rename from test/integration/default/controls/os_env_spec.rb rename to test/kitchen/policies/default/controls/os_env_spec.rb diff --git a/test/integration/default/controls/os_spec.rb b/test/kitchen/policies/default/controls/os_spec.rb similarity index 100% rename from test/integration/default/controls/os_spec.rb rename to test/kitchen/policies/default/controls/os_spec.rb diff --git a/test/integration/default/controls/package_spec.rb b/test/kitchen/policies/default/controls/package_spec.rb similarity index 100% rename from test/integration/default/controls/package_spec.rb rename to test/kitchen/policies/default/controls/package_spec.rb diff --git a/test/integration/default/controls/port_spec.rb b/test/kitchen/policies/default/controls/port_spec.rb similarity index 100% rename from test/integration/default/controls/port_spec.rb rename to test/kitchen/policies/default/controls/port_spec.rb diff --git a/test/integration/default/controls/postgres_session_spec.rb b/test/kitchen/policies/default/controls/postgres_session_spec.rb similarity index 100% rename from test/integration/default/controls/postgres_session_spec.rb rename to test/kitchen/policies/default/controls/postgres_session_spec.rb diff --git a/test/integration/default/controls/powershell_spec.rb b/test/kitchen/policies/default/controls/powershell_spec.rb similarity index 100% rename from test/integration/default/controls/powershell_spec.rb rename to test/kitchen/policies/default/controls/powershell_spec.rb diff --git a/test/integration/default/controls/registry_key_spec.rb b/test/kitchen/policies/default/controls/registry_key_spec.rb similarity index 100% rename from test/integration/default/controls/registry_key_spec.rb rename to test/kitchen/policies/default/controls/registry_key_spec.rb diff --git a/test/integration/default/controls/secpol_spec.rb b/test/kitchen/policies/default/controls/secpol_spec.rb similarity index 100% rename from test/integration/default/controls/secpol_spec.rb rename to test/kitchen/policies/default/controls/secpol_spec.rb diff --git a/test/integration/default/controls/security_identifier_spec.rb b/test/kitchen/policies/default/controls/security_identifier_spec.rb similarity index 100% rename from test/integration/default/controls/security_identifier_spec.rb rename to test/kitchen/policies/default/controls/security_identifier_spec.rb diff --git a/test/integration/default/controls/service_spec.rb b/test/kitchen/policies/default/controls/service_spec.rb similarity index 100% rename from test/integration/default/controls/service_spec.rb rename to test/kitchen/policies/default/controls/service_spec.rb diff --git a/test/integration/default/controls/toml_spec.rb b/test/kitchen/policies/default/controls/toml_spec.rb similarity index 100% rename from test/integration/default/controls/toml_spec.rb rename to test/kitchen/policies/default/controls/toml_spec.rb diff --git a/test/integration/default/controls/user_spec.rb b/test/kitchen/policies/default/controls/user_spec.rb similarity index 100% rename from test/integration/default/controls/user_spec.rb rename to test/kitchen/policies/default/controls/user_spec.rb diff --git a/test/integration/default/controls/vbscript_spec.rb b/test/kitchen/policies/default/controls/vbscript_spec.rb similarity index 100% rename from test/integration/default/controls/vbscript_spec.rb rename to test/kitchen/policies/default/controls/vbscript_spec.rb diff --git a/test/integration/default/controls/virtualization_spec.rb b/test/kitchen/policies/default/controls/virtualization_spec.rb similarity index 100% rename from test/integration/default/controls/virtualization_spec.rb rename to test/kitchen/policies/default/controls/virtualization_spec.rb diff --git a/test/integration/default/controls/windows_hotfix_spec.rb b/test/kitchen/policies/default/controls/windows_hotfix_spec.rb similarity index 100% rename from test/integration/default/controls/windows_hotfix_spec.rb rename to test/kitchen/policies/default/controls/windows_hotfix_spec.rb diff --git a/test/integration/default/controls/windows_task_spec.rb b/test/kitchen/policies/default/controls/windows_task_spec.rb similarity index 100% rename from test/integration/default/controls/windows_task_spec.rb rename to test/kitchen/policies/default/controls/windows_task_spec.rb diff --git a/test/integration/default/controls/wmi_spec.rb b/test/kitchen/policies/default/controls/wmi_spec.rb similarity index 100% rename from test/integration/default/controls/wmi_spec.rb rename to test/kitchen/policies/default/controls/wmi_spec.rb diff --git a/test/integration/default/controls/x509_spec.rb b/test/kitchen/policies/default/controls/x509_spec.rb similarity index 100% rename from test/integration/default/controls/x509_spec.rb rename to test/kitchen/policies/default/controls/x509_spec.rb diff --git a/test/integration/default/controls/xml_spec.rb b/test/kitchen/policies/default/controls/xml_spec.rb similarity index 100% rename from test/integration/default/controls/xml_spec.rb rename to test/kitchen/policies/default/controls/xml_spec.rb diff --git a/test/integration/default/controls/yaml_spec.rb b/test/kitchen/policies/default/controls/yaml_spec.rb similarity index 100% rename from test/integration/default/controls/yaml_spec.rb rename to test/kitchen/policies/default/controls/yaml_spec.rb diff --git a/test/integration/default/inspec.yml b/test/kitchen/policies/default/inspec.yml similarity index 100% rename from test/integration/default/inspec.yml rename to test/kitchen/policies/default/inspec.yml From e298f0f44b1d6052b24388cc53c2a4c7015311fc Mon Sep 17 00:00:00 2001 From: Miah Johnson Date: Wed, 11 Sep 2019 16:44:42 -0700 Subject: [PATCH 3/9] move find_files inspec policy to kitchen directory Signed-off-by: Miah Johnson --- test/{integration => kitchen/policies}/find_files/README.md | 0 .../policies}/find_files/controls/find_files_spec.rb | 0 test/{integration => kitchen/policies}/find_files/inspec.yml | 0 .../policies}/find_files/libraries/find_files.rb | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename test/{integration => kitchen/policies}/find_files/README.md (100%) rename test/{integration => kitchen/policies}/find_files/controls/find_files_spec.rb (100%) rename test/{integration => kitchen/policies}/find_files/inspec.yml (100%) rename test/{integration => kitchen/policies}/find_files/libraries/find_files.rb (100%) diff --git a/test/integration/find_files/README.md b/test/kitchen/policies/find_files/README.md similarity index 100% rename from test/integration/find_files/README.md rename to test/kitchen/policies/find_files/README.md diff --git a/test/integration/find_files/controls/find_files_spec.rb b/test/kitchen/policies/find_files/controls/find_files_spec.rb similarity index 100% rename from test/integration/find_files/controls/find_files_spec.rb rename to test/kitchen/policies/find_files/controls/find_files_spec.rb diff --git a/test/integration/find_files/inspec.yml b/test/kitchen/policies/find_files/inspec.yml similarity index 100% rename from test/integration/find_files/inspec.yml rename to test/kitchen/policies/find_files/inspec.yml diff --git a/test/integration/find_files/libraries/find_files.rb b/test/kitchen/policies/find_files/libraries/find_files.rb similarity index 100% rename from test/integration/find_files/libraries/find_files.rb rename to test/kitchen/policies/find_files/libraries/find_files.rb From 46a2e17ffcc751ff1aeb4baa70e466bf6af4faca Mon Sep 17 00:00:00 2001 From: Miah Johnson Date: Wed, 11 Sep 2019 17:00:14 -0700 Subject: [PATCH 4/9] Update directory in kitchen configuration files Signed-off-by: Miah Johnson --- kitchen.chef.yml | 2 +- kitchen.vagrant.yml | 4 ++-- kitchen.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kitchen.chef.yml b/kitchen.chef.yml index a0ba0af14..1b9ea9e10 100644 --- a/kitchen.chef.yml +++ b/kitchen.chef.yml @@ -11,7 +11,7 @@ verifier: lifecycle: pre_converge: - - local: gem build inspec-core.gemspec --output test/cookbooks/os_prepare/files/inspec-core-local.gem + - local: gem build inspec-core.gemspec --output test/kitchen/cookbooks/os_prepare/files/inspec-core-local.gem platforms: # The following (private) boxes are shared via VagrantCloud and are only diff --git a/kitchen.vagrant.yml b/kitchen.vagrant.yml index 684e3251b..7f42867f9 100644 --- a/kitchen.vagrant.yml +++ b/kitchen.vagrant.yml @@ -11,7 +11,7 @@ verifier: lifecycle: pre_converge: - - local: gem build inspec-core.gemspec --output test/cookbooks/os_prepare/files/inspec-core-local.gem + - local: gem build inspec-core.gemspec --output test/kitchen/cookbooks/os_prepare/files/inspec-core-local.gem platforms: - name: centos-6 @@ -35,6 +35,6 @@ suites: - recipe[os_prepare::find_files] verifier: inspec_tests: - - test/integration/find_files + - test/kitchen/policies/find_files excludes: - freebsd-11 diff --git a/kitchen.yml b/kitchen.yml index 4d5894fe3..342ec1233 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -9,7 +9,7 @@ transport: lifecycle: pre_converge: - - local: gem build inspec-core.gemspec --output test/cookbooks/os_prepare/files/inspec-core-local.gem + - local: gem build inspec-core.gemspec --output test/kitchen/cookbooks/os_prepare/files/inspec-core-local.gem provisioner: name: dokken @@ -106,7 +106,7 @@ suites: - recipe[audit] verifier: inspec_tests: - - test/integration/default + - test/kitchen/policies/default attributes: audit: attributes: From 633a1a1d79c6a9561f327f67e09d7eccfe75107e Mon Sep 17 00:00:00 2001 From: Miah Johnson Date: Wed, 11 Sep 2019 18:43:45 -0700 Subject: [PATCH 5/9] Add pipeline to manage test kitchen builds and a trigger Signed-off-by: Miah Johnson --- .expeditor/config.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.expeditor/config.yml b/.expeditor/config.yml index 72bc05f34..e12f10bce 100644 --- a/.expeditor/config.yml +++ b/.expeditor/config.yml @@ -44,6 +44,9 @@ pipelines: - www/deploy: description: Deploy website to inspec.io definition: .expeditor/wwwdeploy.yml + - verify/resources: + description: Test core resources with test-kitchen. + definition: .expeditor/verify.resources.yml - integration/libraries: description: Integration with plugins, gems, resource packs. definition: .expeditor/integration.libraries.yml @@ -164,3 +167,7 @@ subscriptions: only_if_team_member: - inspec/owners - inspec/inspec-core-team + - post_github_comment:.expeditor/templates/pull_request.mustache + - workload: buildkite_build_passed:{{agent_id}}:verify:* + actions: + - trigger_pipeline:verify/resources From e2e6042cf2477b6eff635c5c0aec3e9e265604af Mon Sep 17 00:00:00 2001 From: Miah Johnson Date: Fri, 13 Sep 2019 10:19:54 -0700 Subject: [PATCH 6/9] Split up kitchen suites by resource type. Signed-off-by: Miah Johnson --- kitchen.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index 342ec1233..9834a9e50 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -100,13 +100,13 @@ platforms: - RUN /usr/bin/apt-get update -y suites: -- name: default +- name: resources-core run_list: - recipe[os_prepare] - recipe[audit] verifier: inspec_tests: - - test/kitchen/policies/default + - test/kitchen/policies/resources-core attributes: audit: attributes: @@ -122,3 +122,7 @@ suites: osprepare: docker: true application: false + +- name: resources-database +- name: resources-unix +- name: resources-windows From 216da3f90a573870bbbd3b39c9bd73e354d60b10 Mon Sep 17 00:00:00 2001 From: Miah Johnson Date: Wed, 16 Oct 2019 22:26:35 -0700 Subject: [PATCH 7/9] Let codeclimate ignore our test files. Signed-off-by: Miah Johnson --- .codeclimate.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.codeclimate.yml b/.codeclimate.yml index fe1ecf824..a4d721d7c 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -26,3 +26,4 @@ plugins: enabled: true exclude_patterns: - "www/source/javascripts/" + - "test/kitchen" From 87b9d569ca68bf8ad58f664080556f6b77dd3817 Mon Sep 17 00:00:00 2001 From: Miah Johnson Date: Wed, 16 Oct 2019 22:27:45 -0700 Subject: [PATCH 8/9] Allow rubocop to ignore our test-kitchen files Signed-off-by: Miah Johnson --- .rubocop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.rubocop.yml b/.rubocop.yml index 15f433377..829aee7d3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,6 @@ AllCops: Exclude: + - 'test/kitchen/**/*' - 'test/integration/**/controls/**/*.rb' - 'test/unit/mock/profiles/**/*.rb' - 'test/unit/mock/config_dirs/**/*.rb' From 227a97991d82b63079437bd4b4afb881e7a61a2f Mon Sep 17 00:00:00 2001 From: Miah Johnson Date: Wed, 16 Oct 2019 22:53:05 -0700 Subject: [PATCH 9/9] Add blank pipeline to allow iteration in next PR Signed-off-by: Miah Johnson --- .expeditor/verify.resources.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .expeditor/verify.resources.yml diff --git a/.expeditor/verify.resources.yml b/.expeditor/verify.resources.yml new file mode 100644 index 000000000..e69de29bb