From eb5c80173c5b9f4326fa0d8e56c1ae15494cc09c Mon Sep 17 00:00:00 2001 From: Aleksei Shpakovskii Date: Wed, 19 Jul 2023 14:22:15 +0200 Subject: [PATCH] Convert win lineendings to Unix for tests which need it on Windows Ticket: ENT-10433 Changelog: none (cherry picked from commit 9a9d10d874c345a3fa8b15c8802f3e7700a86d63) --- .../01_basic/namespaces/bundle_qualified_refs/1/main.cf | 7 +++++++ .../01_basic/namespaces/bundle_qualified_refs/2/main.cf | 7 +++++++ .../iterate_over_data_container_with_nulls.cf | 3 +++ .../04_containers/multiple_cmerge_variable_dynamic.cf | 4 ++++ .../04_containers/multiple_cmerge_variable_static.cf | 4 ++++ .../01_vars/04_containers/pass_variable_container.cf | 4 ++++ .../01_vars/04_containers/pass_variable_container_index.cf | 4 ++++ .../14_reports/00_output/report_printfile_from_bot.cf | 2 ++ .../14_reports/00_output/report_printfile_from_top.cf | 2 ++ .../21_methods/call_methods_using_array_expansion.cf | 4 ++++ tests/acceptance/dcs.cf.sub | 1 + 11 files changed, 42 insertions(+) diff --git a/tests/acceptance/01_vars/01_basic/namespaces/bundle_qualified_refs/1/main.cf b/tests/acceptance/01_vars/01_basic/namespaces/bundle_qualified_refs/1/main.cf index aa880882f8..f7e36e8ead 100644 --- a/tests/acceptance/01_vars/01_basic/namespaces/bundle_qualified_refs/1/main.cf +++ b/tests/acceptance/01_vars/01_basic/namespaces/bundle_qualified_refs/1/main.cf @@ -13,6 +13,13 @@ bundle agent __main__ "bundlesequence" usebundle => default("$(this.promise_filename)"); } +bundle agent init +{ + commands: + windows:: + "$(G.dos2unix) $(this.promise_dirname)/expected_output.txt" -> { "ENT-10433" }; +} + bundle agent test { meta: diff --git a/tests/acceptance/01_vars/01_basic/namespaces/bundle_qualified_refs/2/main.cf b/tests/acceptance/01_vars/01_basic/namespaces/bundle_qualified_refs/2/main.cf index 1099dedeff..4dd235b4c9 100644 --- a/tests/acceptance/01_vars/01_basic/namespaces/bundle_qualified_refs/2/main.cf +++ b/tests/acceptance/01_vars/01_basic/namespaces/bundle_qualified_refs/2/main.cf @@ -13,6 +13,13 @@ bundle agent __main__ "bundlesequence" usebundle => default("$(this.promise_filename)"); } +bundle agent init +{ + commands: + windows:: + "$(G.dos2unix) $(this.promise_dirname)/expected_output.txt" -> { "ENT-10433" }; +} + bundle agent test { meta: diff --git a/tests/acceptance/01_vars/04_containers/iterate_over_data_container_with_nulls.cf b/tests/acceptance/01_vars/04_containers/iterate_over_data_container_with_nulls.cf index 5b6bdec183..795bd02e1e 100644 --- a/tests/acceptance/01_vars/04_containers/iterate_over_data_container_with_nulls.cf +++ b/tests/acceptance/01_vars/04_containers/iterate_over_data_container_with_nulls.cf @@ -7,6 +7,9 @@ body common control bundle agent init { + commands: + windows:: + "$(G.dos2unix) $(this.promise_filename).expected" -> { "ENT-10433" }; files: "$(G.testdir)/actual.txt" diff --git a/tests/acceptance/01_vars/04_containers/multiple_cmerge_variable_dynamic.cf b/tests/acceptance/01_vars/04_containers/multiple_cmerge_variable_dynamic.cf index ed2a131f78..f910fa561f 100644 --- a/tests/acceptance/01_vars/04_containers/multiple_cmerge_variable_dynamic.cf +++ b/tests/acceptance/01_vars/04_containers/multiple_cmerge_variable_dynamic.cf @@ -31,6 +31,10 @@ bundle agent init vars: "autorun" slist => bundlesmatching(".*", "autorun"); + commands: + windows:: + "$(G.dos2unix) $(this.promise_filename).expected" -> { "ENT-10433" }; + files: "$(G.testfile)" edit_line => empty; diff --git a/tests/acceptance/01_vars/04_containers/multiple_cmerge_variable_static.cf b/tests/acceptance/01_vars/04_containers/multiple_cmerge_variable_static.cf index 8f4bd66d61..b60b96afbb 100644 --- a/tests/acceptance/01_vars/04_containers/multiple_cmerge_variable_static.cf +++ b/tests/acceptance/01_vars/04_containers/multiple_cmerge_variable_static.cf @@ -12,6 +12,10 @@ bundle agent init vars: "autorun" slist => bundlesmatching(".*", "autorun"); + commands: + windows:: + "$(G.dos2unix) $(this.promise_filename).expected" -> { "ENT-10433" }; + files: "$(G.testfile)" edit_line => empty; diff --git a/tests/acceptance/01_vars/04_containers/pass_variable_container.cf b/tests/acceptance/01_vars/04_containers/pass_variable_container.cf index fd55182721..40727d8a3f 100644 --- a/tests/acceptance/01_vars/04_containers/pass_variable_container.cf +++ b/tests/acceptance/01_vars/04_containers/pass_variable_container.cf @@ -18,6 +18,10 @@ bundle agent init meta: "tags" slist => { "find" }; + commands: + windows:: + "$(G.dos2unix) $(this.promise_filename).expected" -> { "ENT-10433" }; + vars: # We want to be sure we can reference this data subsequently "d" data => parsejson( '{ diff --git a/tests/acceptance/01_vars/04_containers/pass_variable_container_index.cf b/tests/acceptance/01_vars/04_containers/pass_variable_container_index.cf index cd9f642688..35bfe052ca 100644 --- a/tests/acceptance/01_vars/04_containers/pass_variable_container_index.cf +++ b/tests/acceptance/01_vars/04_containers/pass_variable_container_index.cf @@ -17,6 +17,10 @@ bundle agent init { meta: "tags" slist => { "find" }; + commands: + windows:: + "$(G.dos2unix) $(this.promise_filename).expected" -> { "ENT-10433" }; + } bundle agent test diff --git a/tests/acceptance/14_reports/00_output/report_printfile_from_bot.cf b/tests/acceptance/14_reports/00_output/report_printfile_from_bot.cf index 4956118b88..7f140f924a 100644 --- a/tests/acceptance/14_reports/00_output/report_printfile_from_bot.cf +++ b/tests/acceptance/14_reports/00_output/report_printfile_from_bot.cf @@ -22,6 +22,8 @@ bundle agent check classes: "passed" expression => strcmp("$(test.expected)", "$(test.actual)"); reports: + windows:: + "$(this.promise_filename) SFAIL/ENT-10433"; DEBUG:: "Expected: '$(test.expected)'"; "Found: '$(test.actual)'"; diff --git a/tests/acceptance/14_reports/00_output/report_printfile_from_top.cf b/tests/acceptance/14_reports/00_output/report_printfile_from_top.cf index 66a9ec34f3..f0c0c3adf0 100644 --- a/tests/acceptance/14_reports/00_output/report_printfile_from_top.cf +++ b/tests/acceptance/14_reports/00_output/report_printfile_from_top.cf @@ -22,6 +22,8 @@ bundle agent check classes: "passed" expression => strcmp("$(test.expected)", "$(test.actual)"); reports: + windows:: + "$(this.promise_filename) SFAIL/ENT-10433"; DEBUG:: "Expected: '$(test.expected)'"; "Found: '$(test.actual)'"; diff --git a/tests/acceptance/21_methods/call_methods_using_array_expansion.cf b/tests/acceptance/21_methods/call_methods_using_array_expansion.cf index dbddadbaea..dfa945a782 100644 --- a/tests/acceptance/21_methods/call_methods_using_array_expansion.cf +++ b/tests/acceptance/21_methods/call_methods_using_array_expansion.cf @@ -13,6 +13,10 @@ body common control bundle agent init { + commands: + windows:: + "$(G.dos2unix) $(this.promise_filename).expected.txt" -> { "ENT-10433" }; + files: "$(G.testdir)/reports.txt" delete => tidy; diff --git a/tests/acceptance/dcs.cf.sub b/tests/acceptance/dcs.cf.sub index 5182123191..15bba3cd3d 100644 --- a/tests/acceptance/dcs.cf.sub +++ b/tests/acceptance/dcs.cf.sub @@ -24,6 +24,7 @@ bundle common G # General commands. "cmds" slist => { "date", "dd", + "dos2unix", "diff", "cat", "colordiff",