From 653e6f25f848ccd13549b6e5d6ca7ba2e713ecc4 Mon Sep 17 00:00:00 2001 From: Pavel Boldyrev <627562+bpg@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:27:59 -0400 Subject: [PATCH] chore(vm): fix acceptance test for hardware mapping (#1223) Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com> --- fwprovider/tests/resource_hardware_mapping_test.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/fwprovider/tests/resource_hardware_mapping_test.go b/fwprovider/tests/resource_hardware_mapping_test.go index 1411aac0..d4bc1edf 100644 --- a/fwprovider/tests/resource_hardware_mapping_test.go +++ b/fwprovider/tests/resource_hardware_mapping_test.go @@ -664,19 +664,6 @@ func TestAccResourceHardwareMappingUSBInvalidInput(t *testing.T) { // Test the "Create" method implementation where all possible attributes are specified, but an error is expected // when using an invalid device path. { - ExpectError: regexp.MustCompile( - fmt.Sprintf( - // The error line is, for whatever reason, broken down into multiple lines in acceptance tests, so we need - // to capture newline characters. - // Note that the regular expression syntax used by Go does not capture newlines with the "." matcher, - // so we need to enable the "s" flag that enabled "." - // to match "\n". - // References: - // 1. https://pkg.go.dev/regexp/syntax - `(?s).*%s(?s).*`, - hwm.ErrResourceMessageInvalidPath(proxmoxtypes.TypeUSB), - ), - ), Config: fmt.Sprintf( ` resource "proxmox_virtual_environment_hardware_mapping_usb" "test" { @@ -699,6 +686,7 @@ func TestAccResourceHardwareMappingUSBInvalidInput(t *testing.T) { data.MapDeviceIDs[0], te.nodeName, ), + ExpectError: regexp.MustCompile(`valid Linux device path for hardware mapping of type "usb"`), }, }, },