Skip to content

Commit b3f8a7b

Browse files
author
Andy.McCullough
committed
Fixed Acc Test issue
Because the expiration_date value is set to be relative to execution time this is expected to generate a continual diff. This is beneficial as it ensures that a valid token is always available for registration activities downstream.
1 parent defb851 commit b3f8a7b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

internal/services/desktopvirtualization/virtual_desktop_host_pool_registration_info_resource_test.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ func TestAccVirtualDesktopHostPoolRegInfo_basic(t *testing.T) {
2626
Check: acceptance.ComposeTestCheckFunc(
2727
check.That(data.ResourceName).ExistsInAzure(r),
2828
),
29+
// a non-empty plan is expected as the expiration_date value is relative to execution so a continual change is expected in this case
30+
ExpectNonEmptyPlan: true,
2931
},
3032
})
3133
}
3234

3335
func TestAccVirtualDesktopHostPoolRegInfo_update(t *testing.T) {
34-
data := acceptance.BuildTestData(t, "azurerm_virtual_desktop_host_pool", "test")
36+
data := acceptance.BuildTestData(t, "azurerm_virtual_desktop_host_pool_registration_info", "test")
3537
r := VirtualDesktopHostPoolRegistrationInfoResource{}
3638

3739
data.ResourceTest(t, r, []acceptance.TestStep{
@@ -40,19 +42,24 @@ func TestAccVirtualDesktopHostPoolRegInfo_update(t *testing.T) {
4042
Check: acceptance.ComposeTestCheckFunc(
4143
check.That(data.ResourceName).ExistsInAzure(r),
4244
),
45+
// a non-empty plan is expected as the expiration_date value is relative to execution so a continual change is expected in this case
46+
ExpectNonEmptyPlan: true,
4347
},
4448
{
4549
Config: r.complete(data),
4650
Check: acceptance.ComposeTestCheckFunc(
4751
check.That(data.ResourceName).ExistsInAzure(r),
4852
),
53+
// a non-empty plan is expected as the expiration_date value is relative to execution so a continual change is expected in this case
54+
ExpectNonEmptyPlan: true,
4955
},
5056
{
5157
Config: r.basic(data),
5258
Check: acceptance.ComposeTestCheckFunc(
5359
check.That(data.ResourceName).ExistsInAzure(r),
54-
check.That(data.ResourceName).Key("tags.%").HasValue("0"),
5560
),
61+
// a non-empty plan is expected as the expiration_date value is relative to execution so a continual change is expected in this case
62+
ExpectNonEmptyPlan: true,
5663
},
5764
})
5865
}

0 commit comments

Comments
 (0)