From a366b7a7c6bf14681e8cfd5859612876d461975c Mon Sep 17 00:00:00 2001 From: Pawel Date: Mon, 8 Jul 2024 20:06:52 +0200 Subject: [PATCH 1/4] fix access codes test --- test/integration/access_codes_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/integration/access_codes_test.go b/test/integration/access_codes_test.go index 77a46ab..6ec2afa 100644 --- a/test/integration/access_codes_test.go +++ b/test/integration/access_codes_test.go @@ -137,7 +137,8 @@ func TestAccessCodes(t *testing.T) { }, ) require.NoError(t, err) - assert.NotNil(t, deleteResponse.ActionAttempt.Success) + assert.NotNil(t, deleteResponse.ActionAttempt.ActionAttemptActionAttemptId.Status()) + assert.Equal(t, "success", deleteResponse.ActionAttempt.ActionAttemptActionAttemptId.Status()) deviceIds := make([]string, 0, len(accessCodes)) for _, accessCode := range accessCodes { From a73dae0e74f324965dfff325db95502086c362a4 Mon Sep 17 00:00:00 2001 From: Pawel Date: Mon, 8 Jul 2024 20:33:39 +0200 Subject: [PATCH 2/4] wip: fix test --- test/integration/access_codes_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/integration/access_codes_test.go b/test/integration/access_codes_test.go index 6ec2afa..bc80f33 100644 --- a/test/integration/access_codes_test.go +++ b/test/integration/access_codes_test.go @@ -137,9 +137,12 @@ func TestAccessCodes(t *testing.T) { }, ) require.NoError(t, err) - assert.NotNil(t, deleteResponse.ActionAttempt.ActionAttemptActionAttemptId.Status()) - assert.Equal(t, "success", deleteResponse.ActionAttempt.ActionAttemptActionAttemptId.Status()) + require.NotNil(t, deleteResponse) + require.NotNil(t, deleteResponse.ActionAttempt) + actionAttempt := deleteResponse.ActionAttempt + assert.Equal(t, "success", actionAttempt.ActionAttemptActionAttemptId.Status()) + deviceIds := make([]string, 0, len(accessCodes)) for _, accessCode := range accessCodes { deviceIds = append(deviceIds, accessCode.DeviceId) @@ -162,3 +165,4 @@ func TestAccessCodes(t *testing.T) { } assert.Len(t, commonCodes, 1) } + From 39d7a6257e48cbe63a876d06de9973a6fc81149c Mon Sep 17 00:00:00 2001 From: Pawel Date: Mon, 8 Jul 2024 21:00:09 +0200 Subject: [PATCH 3/4] fix test --- test/integration/access_codes_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/integration/access_codes_test.go b/test/integration/access_codes_test.go index bc80f33..173353c 100644 --- a/test/integration/access_codes_test.go +++ b/test/integration/access_codes_test.go @@ -140,9 +140,6 @@ func TestAccessCodes(t *testing.T) { require.NotNil(t, deleteResponse) require.NotNil(t, deleteResponse.ActionAttempt) - actionAttempt := deleteResponse.ActionAttempt - assert.Equal(t, "success", actionAttempt.ActionAttemptActionAttemptId.Status()) - deviceIds := make([]string, 0, len(accessCodes)) for _, accessCode := range accessCodes { deviceIds = append(deviceIds, accessCode.DeviceId) From 2a089e4cdd5bd2b2c89e66849ff37b4100121c6b Mon Sep 17 00:00:00 2001 From: Pawel Date: Mon, 8 Jul 2024 21:20:01 +0200 Subject: [PATCH 4/4] wip --- test/integration/access_codes_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/test/integration/access_codes_test.go b/test/integration/access_codes_test.go index 173353c..4243f6a 100644 --- a/test/integration/access_codes_test.go +++ b/test/integration/access_codes_test.go @@ -139,6 +139,7 @@ func TestAccessCodes(t *testing.T) { require.NoError(t, err) require.NotNil(t, deleteResponse) require.NotNil(t, deleteResponse.ActionAttempt) + assert.Equal(t, deleteResponse.ActionAttempt.ActionAttemptActionAttemptId.Status(), "success") deviceIds := make([]string, 0, len(accessCodes)) for _, accessCode := range accessCodes {