Skip to content

Commit

Permalink
test changed from enrollment set to investigate #61
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Oct 28, 2024
1 parent 13b0256 commit 70e2289
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions storage/test/enrollments.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,15 @@ func testEnrollments(t *testing.T, store myStorage, ctx context.Context, d *ddm.
}

// dissociate
_, err = store.RemoveEnrollmentSet(ctx, enrollmentID, setName)
changed, err := store.RemoveEnrollmentSet(ctx, enrollmentID, setName)
if err != nil {
t.Fatal(err)
}

if have, want := changed, true; have != want {
t.Errorf("changed: have: %v, want: %v", have, want)
}

// verify no ref
setNames, err = store.RetrieveEnrollmentSets(ctx, enrollmentID)
if err != nil {
Expand All @@ -166,7 +170,7 @@ func testEnrollments(t *testing.T, store myStorage, ctx context.Context, d *ddm.
}

// associate again
changed, err := store.StoreEnrollmentSet(ctx, enrollmentID, setName)
changed, err = store.StoreEnrollmentSet(ctx, enrollmentID, setName)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 70e2289

Please sign in to comment.