Skip to content

Commit

Permalink
Extend conformance tests to verify stored device requests match the i…
Browse files Browse the repository at this point in the history
…nput

Signed-off-by: MM53 <[email protected]>
  • Loading branch information
MM53 committed Sep 25, 2023
1 parent 0409484 commit 441973c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions storage/conformance/conformance.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"time"

"github.com/kylelemons/godebug/pretty"
"github.com/stretchr/testify/require"
"golang.org/x/crypto/bcrypt"
jose "gopkg.in/square/go-jose.v2"

Expand Down Expand Up @@ -991,6 +992,13 @@ func testDeviceRequestCRUD(t *testing.T, s storage.Storage) {
err := s.CreateDeviceRequest(d1)
mustBeErrAlreadyExists(t, "device request", err)

got, err := s.GetDeviceRequest(d1.UserCode)
if err != nil {
t.Fatalf("failed to get device request: %v", err)
}

require.Equal(t, d1, got)

// No manual deletes for device requests, will be handled by garbage collection routines
// see testGC
}
Expand Down

0 comments on commit 441973c

Please sign in to comment.