-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial revision, add basic npm tests. tests run locally; haven't run…
… on gitlab yet (#7401) update chef version for running locally on windows Adds new kitchen tests to gitlab shorten name to meet azure length requirements Split npm into two separate tests. The basic install validation, that can be run on only a few platforms. The test that the kernel driver loads and runs onto its own tests, which will be run on all supported kernels Make the npm test actually load and check system probe. fix compile error on missing test Add reinstall cookbook (for reinstall testing with NPM flag) Refactor copy/pasted code for checking agent version down to single implementation. Add 3 new test rspecs - upgrade-to-npm On upgrade from prior (non-NPM enabled version), when proper flag is supplied, ensure NPM is actually enabled - upgrade-no-npm On upgrade from prior (non-npm enabled version), when flag is not supplied, ensure NPM is not installed - win-reinstall-option Allow reinstall with flag to enable NPM, if NPM was intended (but overlooked) on original install fix improper quoting on require statements Fix errors in refactoring upgrade/version checking fix copy/paste
- Loading branch information
1 parent
d773733
commit 0c5dde9
Showing
37 changed files
with
811 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
suites: | ||
|
||
# installs the current shipping latest build | ||
# then upgrades, and ensures that NPM is installed and running | ||
- name: dd-agent-upgrade-to-npm | ||
run_list: | ||
- "recipe[dd-agent-install]" | ||
- "recipe[dd-agent-upgrade]" | ||
attributes: | ||
datadog: | ||
agent_major_version: 7 | ||
api_key: <%= api_key %> | ||
<% if ENV['AGENT_FLAVOR'] == 'datadog-iot-agent' %> | ||
agent_flavor: 'datadog-iot-agent' | ||
<% end %> | ||
dd-agent-install: | ||
agent_major_version: 7 | ||
dd-agent-upgrade: | ||
add_new_repo: true | ||
<% if ENV['AGENT_FLAVOR'] == 'datadog-iot-agent' %> | ||
package_name: 'datadog-iot-agent' | ||
<% end %> | ||
<% dd_agent_config.each do |key, value| %> | ||
<%= key %>: <%= value %> | ||
<% end %> | ||
<% if ENV['AGENT_VERSION'] %> | ||
windows_version: "<%= ENV['AGENT_VERSION'] %>" | ||
<% end %> | ||
<% if ENV['WINDOWS_AGENT_FILE'] %> | ||
windows_agent_filename: "<%= ENV['WINDOWS_AGENT_FILE'] %>" | ||
<% end %> | ||
agent_install_options: > | ||
ADDLOCAL=ALL | ||
dd-agent-import-conf: | ||
api_key: <%= api_key %> | ||
dd-agent-upgrade-rspec: | ||
# Used by the rspec test to know the version to which the agent should be upgraded | ||
agent_expected_version: &agent_expected_version <%= ENV['DD_AGENT_EXPECTED_VERSION'] || "5.99.0" %> | ||
dd-agent-rspec: | ||
skip_windows_signing_test: &skip_windows_signing_test <%= ENV['SKIP_SIGNATURE_TEST'] || false %> | ||
|
||
# installs the current shipping latest build | ||
# then upgrades, and ensures that NPM not installed (due to lack of installation option) | ||
- name: dd-agent-upgrade-no-npm | ||
run_list: | ||
- "recipe[dd-agent-install]" | ||
- "recipe[dd-agent-upgrade]" | ||
attributes: | ||
datadog: | ||
agent_major_version: 7 | ||
api_key: <%= api_key %> | ||
<% if ENV['AGENT_FLAVOR'] == 'datadog-iot-agent' %> | ||
agent_flavor: 'datadog-iot-agent' | ||
<% end %> | ||
dd-agent-install: | ||
agent_major_version: 7 | ||
dd-agent-upgrade: | ||
add_new_repo: true | ||
<% if ENV['AGENT_FLAVOR'] == 'datadog-iot-agent' %> | ||
package_name: 'datadog-iot-agent' | ||
<% end %> | ||
<% dd_agent_config.each do |key, value| %> | ||
<%= key %>: <%= value %> | ||
<% end %> | ||
<% if ENV['AGENT_VERSION'] %> | ||
windows_version: "<%= ENV['AGENT_VERSION'] %>" | ||
<% end %> | ||
<% if ENV['WINDOWS_AGENT_FILE'] %> | ||
windows_agent_filename: "<%= ENV['WINDOWS_AGENT_FILE'] %>" | ||
<% end %> | ||
dd-agent-import-conf: | ||
api_key: <%= api_key %> | ||
dd-agent-upgrade-rspec: | ||
# Used by the rspec test to know the version to which the agent should be upgraded | ||
agent_expected_version: &agent_expected_version <%= ENV['DD_AGENT_EXPECTED_VERSION'] || "5.99.0" %> | ||
dd-agent-rspec: | ||
skip_windows_signing_test: &skip_windows_signing_test <%= ENV['SKIP_SIGNATURE_TEST'] || false %> | ||
|
||
- name: dd-agent-win-npm-no-npm-option | ||
run_list: | ||
- "recipe[dd-agent-install]" | ||
attributes: | ||
datadog: | ||
agent_major_version: 7 | ||
api_key: <%= api_key %> | ||
<% if ENV['AGENT_FLAVOR'] == 'datadog-iot-agent' %> | ||
agent_flavor: 'datadog-iot-agent' | ||
<% end %> | ||
dd-agent-install: | ||
agent6: true | ||
agent_major_version: 7 | ||
windows_agent_url: <%= windows_agent_url %> | ||
<% if ENV['AGENT_VERSION'] %> | ||
windows_version: "<%= ENV['AGENT_VERSION'] %>" | ||
<% end %> | ||
windows_agent_url: <%= windows_agent_url %> | ||
<% if ENV['WINDOWS_AGENT_FILE'] %> | ||
windows_agent_filename: "<%= ENV['WINDOWS_AGENT_FILE'] %>" | ||
<% end %> | ||
dd-agent-rspec: | ||
agent_flavor: <%= ENV['AGENT_FLAVOR'] || "datadog-agent" %> | ||
skip_windows_signing_test: &skip_windows_signing_test <%= ENV['SKIP_SIGNATURE_TEST'] || false %> | ||
|
||
- name: dd-agent-win-reinstall-option | ||
run_list: | ||
- "recipe[dd-agent-install]" | ||
- "recipe[dd-agent-reinstall]" | ||
attributes: | ||
datadog: | ||
agent_major_version: 7 | ||
api_key: <%= api_key %> | ||
<% if ENV['AGENT_FLAVOR'] == 'datadog-iot-agent' %> | ||
agent_flavor: 'datadog-iot-agent' | ||
<% end %> | ||
dd-agent-install: | ||
agent6: true | ||
agent_major_version: 7 | ||
windows_agent_url: <%= windows_agent_url %> | ||
<% if ENV['AGENT_VERSION'] %> | ||
windows_version: "<%= ENV['AGENT_VERSION'] %>" | ||
<% end %> | ||
windows_agent_url: <%= windows_agent_url %> | ||
<% if ENV['WINDOWS_AGENT_FILE'] %> | ||
windows_agent_filename: "<%= ENV['WINDOWS_AGENT_FILE'] %>" | ||
<% end %> | ||
dd-agent-reinstall: | ||
agent6: true | ||
agent_major_version: 7 | ||
windows_agent_url: <%= windows_agent_url %> | ||
<% if ENV['AGENT_VERSION'] %> | ||
windows_version: "<%= ENV['AGENT_VERSION'] %>" | ||
<% end %> | ||
windows_agent_url: <%= windows_agent_url %> | ||
<% if ENV['WINDOWS_AGENT_FILE'] %> | ||
windows_agent_filename: "<%= ENV['WINDOWS_AGENT_FILE'] %>" | ||
<% end %> | ||
agent_install_options: > | ||
ADDLOCAL=ALL | ||
dd-agent-rspec: | ||
agent_flavor: <%= ENV['AGENT_FLAVOR'] || "datadog-agent" %> | ||
skip_windows_signing_test: &skip_windows_signing_test <%= ENV['SKIP_SIGNATURE_TEST'] || false %> | ||
|
||
|
||
- name: dd-agent-win-npm-beta-upgrade | ||
run_list: | ||
- "recipe[dd-agent-install]" | ||
- "recipe[dd-agent-upgrade]" | ||
attributes: | ||
datadog: | ||
agent_major_version: 7 | ||
api_key: <%= api_key %> | ||
<% if ENV['AGENT_FLAVOR'] == 'datadog-iot-agent' %> | ||
agent_flavor: 'datadog-iot-agent' | ||
<% end %> | ||
dd-agent-install: | ||
agent_major_version: 7 | ||
windows_agent_url: https://ddagent-windows-unstable.s3.amazonaws.com/ | ||
windows_agent_filename: datadog-agent-7.23.2-beta1-1-x86_64 | ||
dd-agent-upgrade: | ||
add_new_repo: true | ||
<% if ENV['AGENT_FLAVOR'] == 'datadog-iot-agent' %> | ||
package_name: 'datadog-iot-agent' | ||
<% end %> | ||
<% dd_agent_config.each do |key, value| %> | ||
<%= key %>: <%= value %> | ||
<% end %> | ||
<% if ENV['AGENT_VERSION'] %> | ||
windows_version: "<%= ENV['AGENT_VERSION'] %>" | ||
<% end %> | ||
<% if ENV['WINDOWS_AGENT_FILE'] %> | ||
windows_agent_filename: "<%= ENV['WINDOWS_AGENT_FILE'] %>" | ||
<% end %> | ||
dd-agent-import-conf: | ||
api_key: <%= api_key %> | ||
dd-agent-upgrade-rspec: | ||
# Used by the rspec test to know the version to which the agent should be upgraded | ||
agent_expected_version: &agent_expected_version <%= ENV['DD_AGENT_EXPECTED_VERSION'] || "5.99.0" %> | ||
dd-agent-rspec: | ||
skip_windows_signing_test: &skip_windows_signing_test <%= ENV['SKIP_SIGNATURE_TEST'] || false %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
suites: | ||
|
||
- name: dd-agent-win-with-npm-option | ||
run_list: | ||
- "recipe[dd-agent-install]" | ||
attributes: | ||
datadog: | ||
agent_major_version: 7 | ||
api_key: <%= api_key %> | ||
<% if ENV['AGENT_FLAVOR'] == 'datadog-iot-agent' %> | ||
agent_flavor: 'datadog-iot-agent' | ||
<% end %> | ||
enable_process_agent: true | ||
dd-agent-install: | ||
agent_major_version: 7 | ||
agent6: true | ||
windows_agent_url: <%= windows_agent_url %> | ||
<% if ENV['AGENT_VERSION'] %> | ||
windows_version: "<%= ENV['AGENT_VERSION'] %>" | ||
<% end %> | ||
windows_agent_url: <%= windows_agent_url %> | ||
<% if ENV['WINDOWS_AGENT_FILE'] %> | ||
windows_agent_filename: "<%= ENV['WINDOWS_AGENT_FILE'] %>" | ||
<% end %> | ||
agent_install_options: > | ||
NPM=true | ||
dd-agent-rspec: | ||
agent_flavor: <%= ENV['AGENT_FLAVOR'] || "datadog-agent" %> | ||
skip_windows_signing_test: &skip_windows_signing_test <%= ENV['SKIP_SIGNATURE_TEST'] || false %> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.vagrant | ||
Berksfile.lock | ||
*~ | ||
*# | ||
.#* | ||
\#*# | ||
.*.sw[a-z] | ||
*.un~ | ||
/cookbooks | ||
|
||
# Bundler | ||
Gemfile.lock | ||
bin/* | ||
.bundle/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
site :opscode | ||
|
||
metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'bundler', '1.17.3' | ||
gem 'berkshelf' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# dd-agent-reinstall cookbook | ||
|
||
Reinstalls the same version, using different installer flags |
Oops, something went wrong.