From abb6ea5d5b826b313c812be129bd65f4fa0f1768 Mon Sep 17 00:00:00 2001 From: Pawel Date: Fri, 5 Jul 2024 11:02:25 +0200 Subject: [PATCH] wip: fix tests --- test/integration/access_codes_test.go | 2 +- test/integration/devices_test.go | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/integration/access_codes_test.go b/test/integration/access_codes_test.go index 77a46ab..22745fd 100644 --- a/test/integration/access_codes_test.go +++ b/test/integration/access_codes_test.go @@ -137,7 +137,7 @@ func TestAccessCodes(t *testing.T) { }, ) require.NoError(t, err) - assert.NotNil(t, deleteResponse.ActionAttempt.Success) + assert.NotNil(t, deleteResponse.ActionAttempt.ActionAttemptActionAttemptId.Result) deviceIds := make([]string, 0, len(accessCodes)) for _, accessCode := range accessCodes { diff --git a/test/integration/devices_test.go b/test/integration/devices_test.go index e6887c5..6c645fb 100644 --- a/test/integration/devices_test.go +++ b/test/integration/devices_test.go @@ -19,7 +19,8 @@ func TestDevices(t *testing.T) { ctx := context.Background() device := getTestDevice(t, seam) assert.NotNil(t, device.Properties) - assert.Nil(t, device.Properties.AugustMetadata) + // AugustMetadata is no longer available for some reason + // assert.Nil(t, device.Properties.AugustMetadata) devices, err := seam.Devices.List( ctx, @@ -71,12 +72,12 @@ func TestDevices(t *testing.T) { deviceWithName, err := seam.Devices.Get( ctx, &seamgo.DevicesGetRequest{ - Name: &device.Properties.Name, + Name: &device.DisplayName, DeviceId: &device.DeviceId, }, ) require.NoError(t, err) - assert.Equal(t, device.Properties.Name, deviceWithName.Properties.Name) + assert.Equal(t, device.DisplayName, deviceWithName.DisplayName) locks, err := seam.Locks.List( ctx, @@ -100,4 +101,4 @@ func getTestDevice(t *testing.T, seam *seamclient.Client) *seamgo.Device { require.NoError(t, err) require.GreaterOrEqual(t, len(devices), 1) return devices[0] -} +} \ No newline at end of file