From efb783e924b462a23662dcf28b7387d1a890879e Mon Sep 17 00:00:00 2001 From: Kevin Fairise Date: Tue, 10 Dec 2024 16:31:39 +0100 Subject: [PATCH 1/4] Revert "Do not print Ansible logs (#31814)" This reverts commit e03dff2a8a79262d4bd5ed8e926ee97c9e38043c. --- test/new-e2e/tests/installer/unix/all_packages_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/new-e2e/tests/installer/unix/all_packages_test.go b/test/new-e2e/tests/installer/unix/all_packages_test.go index 82f3d6bf44c12..f213a0fda8394 100644 --- a/test/new-e2e/tests/installer/unix/all_packages_test.go +++ b/test/new-e2e/tests/installer/unix/all_packages_test.go @@ -217,7 +217,7 @@ func (s *packageBaseSuite) RunInstallScript(params ...string) { playbookPath := s.writeAnsiblePlaybook(env, params...) // Run the playbook - s.Env().RemoteHost.MustExecute(fmt.Sprintf("%sansible-playbook %s > /dev/null 2> /dev/null", ansiblePrefix, playbookPath)) + s.Env().RemoteHost.MustExecute(fmt.Sprintf("%sansible-playbook -vvv %s", ansiblePrefix, playbookPath)) // touch install files for compatibility s.Env().RemoteHost.MustExecute("touch /tmp/datadog-installer-stdout.log") From d18598bde8b055a09f2fc5cbcaf94118edee9759 Mon Sep 17 00:00:00 2001 From: Kevin Fairise Date: Wed, 11 Dec 2024 15:45:37 +0100 Subject: [PATCH 2/4] Test with an invalid API key --- test/new-e2e/pkg/runner/parameters/store_aws.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/new-e2e/pkg/runner/parameters/store_aws.go b/test/new-e2e/pkg/runner/parameters/store_aws.go index 7a2bc86aeea18..ac7c153dd21b6 100644 --- a/test/new-e2e/pkg/runner/parameters/store_aws.go +++ b/test/new-e2e/pkg/runner/parameters/store_aws.go @@ -60,6 +60,6 @@ func (s awsStore) get(key StoreKey) (string, error) { // awsOverrides is a map of StoreKey to StoreKey used to override key only in AWS store var awsOverrides = map[StoreKey]StoreKey{ - APIKey: "api_key_3", + APIKey: "api_key_3_test_invalid", APPKey: "app_key_2", } From 65952cc0d2518442d5e182f7c3d782493a404115 Mon Sep 17 00:00:00 2001 From: Kevin Fairise Date: Thu, 12 Dec 2024 14:12:50 +0100 Subject: [PATCH 3/4] print output --- test/new-e2e/tests/installer/unix/all_packages_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/new-e2e/tests/installer/unix/all_packages_test.go b/test/new-e2e/tests/installer/unix/all_packages_test.go index f213a0fda8394..5f63d06f6494d 100644 --- a/test/new-e2e/tests/installer/unix/all_packages_test.go +++ b/test/new-e2e/tests/installer/unix/all_packages_test.go @@ -217,8 +217,8 @@ func (s *packageBaseSuite) RunInstallScript(params ...string) { playbookPath := s.writeAnsiblePlaybook(env, params...) // Run the playbook - s.Env().RemoteHost.MustExecute(fmt.Sprintf("%sansible-playbook -vvv %s", ansiblePrefix, playbookPath)) - + output := s.Env().RemoteHost.MustExecute(fmt.Sprintf("%sansible-playbook -vvv %s", ansiblePrefix, playbookPath)) + fmt.Println("Ansible output should be scrubbed: ", output) // touch install files for compatibility s.Env().RemoteHost.MustExecute("touch /tmp/datadog-installer-stdout.log") s.Env().RemoteHost.MustExecute("touch /tmp/datadog-installer-stderr.log") From c7e28169202024fab69f794335240d7cc8b6ed97 Mon Sep 17 00:00:00 2001 From: Kevin Fairise Date: Thu, 12 Dec 2024 15:39:44 +0100 Subject: [PATCH 4/4] Revert fake key --- test/new-e2e/pkg/runner/parameters/store_aws.go | 2 +- test/new-e2e/tests/installer/unix/all_packages_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/new-e2e/pkg/runner/parameters/store_aws.go b/test/new-e2e/pkg/runner/parameters/store_aws.go index ac7c153dd21b6..7a2bc86aeea18 100644 --- a/test/new-e2e/pkg/runner/parameters/store_aws.go +++ b/test/new-e2e/pkg/runner/parameters/store_aws.go @@ -60,6 +60,6 @@ func (s awsStore) get(key StoreKey) (string, error) { // awsOverrides is a map of StoreKey to StoreKey used to override key only in AWS store var awsOverrides = map[StoreKey]StoreKey{ - APIKey: "api_key_3_test_invalid", + APIKey: "api_key_3", APPKey: "app_key_2", } diff --git a/test/new-e2e/tests/installer/unix/all_packages_test.go b/test/new-e2e/tests/installer/unix/all_packages_test.go index 5f63d06f6494d..f213a0fda8394 100644 --- a/test/new-e2e/tests/installer/unix/all_packages_test.go +++ b/test/new-e2e/tests/installer/unix/all_packages_test.go @@ -217,8 +217,8 @@ func (s *packageBaseSuite) RunInstallScript(params ...string) { playbookPath := s.writeAnsiblePlaybook(env, params...) // Run the playbook - output := s.Env().RemoteHost.MustExecute(fmt.Sprintf("%sansible-playbook -vvv %s", ansiblePrefix, playbookPath)) - fmt.Println("Ansible output should be scrubbed: ", output) + s.Env().RemoteHost.MustExecute(fmt.Sprintf("%sansible-playbook -vvv %s", ansiblePrefix, playbookPath)) + // touch install files for compatibility s.Env().RemoteHost.MustExecute("touch /tmp/datadog-installer-stdout.log") s.Env().RemoteHost.MustExecute("touch /tmp/datadog-installer-stderr.log")