diff --git a/azure-pipelines/build/windows/dosdkcpp.yml b/azure-pipelines/build/windows/dosdkcpp.yml index 0b4552bc..92492a72 100644 --- a/azure-pipelines/build/windows/dosdkcpp.yml +++ b/azure-pipelines/build/windows/dosdkcpp.yml @@ -32,7 +32,7 @@ pr: - sdk-cpp/build/cleanup-install.sh pool: - vmImage: "windows-latest" + vmImage: "windows-2019" jobs: - job: Debug diff --git a/sdk-cpp/tests/com/download_properties_tests.cpp b/sdk-cpp/tests/com/download_properties_tests.cpp index 2124ce74..2d8d7be2 100644 --- a/sdk-cpp/tests/com/download_properties_tests.cpp +++ b/sdk-cpp/tests/com/download_properties_tests.cpp @@ -106,18 +106,19 @@ TEST_F(DownloadPropertyTestsDOSVC, InvalidPhfDigestTest) { auto simpleDownload = msdo::download::make(g_smallFileUrl, g_tmpFileName); + msdo::download_property_value integrityCheckInfo = msdo::download_property_value::make("blah"); try { - msdo::download_property_value integrityCheckInfo = msdo::download_property_value::make("blah"); + // Call fails only on 19041+ builds of Windows. Earlier versions did not support setting + // PHF info through IDODownload and the SDK has a workaround to ignore that error. simpleDownload->set_property(msdo::download_property::integrity_check_info, integrityCheckInfo); } catch (const msdo::exception& e) { - std::vector expectedErrors = { static_cast(msdo::errc::invalid_arg), static_cast(msdo::errc::do_e_unknown_property_id) }; + std::vector expectedErrors = { static_cast(msdo::errc::invalid_arg) }; VerifyError(e.error_code().value(), expectedErrors); return; } - ASSERT_TRUE(false); } // For some reason, custom headers are getting rejected and returning E_INVALIDARG now, disabling test for now diff --git a/sdk-cpp/tests_nothrow/download_properties_tests.cpp b/sdk-cpp/tests_nothrow/download_properties_tests.cpp index 57319ec8..f5037966 100644 --- a/sdk-cpp/tests_nothrow/download_properties_tests.cpp +++ b/sdk-cpp/tests_nothrow/download_properties_tests.cpp @@ -126,12 +126,11 @@ TEST_F(DownloadPropertyTestsDOSVC_NoThrow, InvalidPhfDigestTest) auto simpleDownload = g_MakeDownload(g_smallFileUrl, g_tmpFileName); msdo::download_property_value integrityCheckInfo = g_MakePropertyValue("blah"); - std::vector expectedErrors = { static_cast(msdo::errc::invalid_arg), - static_cast(msdo::errc::do_e_unknown_property_id) }; + std::vector expectedErrors = { 0, static_cast(msdo::errc::invalid_arg) }; VerifyCallWithExpectedErrors([&]() { return simpleDownload->set_property_nothrow(msdo::download_property::integrity_check_info, integrityCheckInfo); - }, { static_cast(msdo::errc::invalid_arg), static_cast(msdo::errc::do_e_unknown_property_id) }); + }, expectedErrors); } // For some reason, custom headers are getting rejected and returning E_INVALIDARG now, disabling test for now