|
1 | 1 | /*!
|
2 |
| - * Copyright (c) 2020-2024 Digital Bazaar, Inc. All rights reserved. |
| 2 | + * Copyright (c) 2020-2025 Digital Bazaar, Inc. All rights reserved. |
3 | 3 | */
|
4 | 4 | import * as helpers from './helpers.js';
|
5 | 5 | import {v4 as uuid} from 'uuid';
|
@@ -64,7 +64,7 @@ describe('status APIs', () => {
|
64 | 64 | ]);
|
65 | 65 | });
|
66 | 66 |
|
67 |
| - it('creates a "BitstringStatusList" status list', async () => { |
| 67 | + it('creates a "BitstringStatusList" status list size=2^17', async () => { |
68 | 68 | const statusListId = `${statusInstanceId}/status-lists/${uuid()}`;
|
69 | 69 | const statusListOptions = {
|
70 | 70 | credentialId: statusListId,
|
@@ -102,6 +102,44 @@ describe('status APIs', () => {
|
102 | 102 | ]);
|
103 | 103 | });
|
104 | 104 |
|
| 105 | + it('creates a "BitstringStatusList" status list size=2^26', async () => { |
| 106 | + const statusListId = `${statusInstanceId}/status-lists/${uuid()}`; |
| 107 | + const statusListOptions = { |
| 108 | + credentialId: statusListId, |
| 109 | + type: 'BitstringStatusList', |
| 110 | + indexAllocator: `urn:uuid:${uuid()}`, |
| 111 | + length: 67108864, |
| 112 | + statusPurpose: 'revocation' |
| 113 | + }; |
| 114 | + let error; |
| 115 | + let result; |
| 116 | + try { |
| 117 | + result = await helpers.createStatusList({ |
| 118 | + url: statusListId, |
| 119 | + capabilityAgent, |
| 120 | + capability: statusInstanceRootZcap, |
| 121 | + statusListOptions |
| 122 | + }); |
| 123 | + } catch(e) { |
| 124 | + error = e; |
| 125 | + } |
| 126 | + assertNoError(error); |
| 127 | + should.exist(result.id); |
| 128 | + result.id.should.equal(statusListId); |
| 129 | + |
| 130 | + // get status list and make assertions on it |
| 131 | + const slc = await helpers.getStatusListCredential({statusListId}); |
| 132 | + should.exist(slc); |
| 133 | + slc.should.include.keys([ |
| 134 | + 'id', 'credentialSubject', 'validFrom', 'validUntil' |
| 135 | + ]); |
| 136 | + slc.id.should.equal(statusListOptions.credentialId); |
| 137 | + slc.id.should.equal(statusListId); |
| 138 | + slc.credentialSubject.should.include.keys([ |
| 139 | + 'id', 'type', 'encodedList', 'statusPurpose' |
| 140 | + ]); |
| 141 | + }); |
| 142 | + |
105 | 143 | it('creates a status list with non-equal credential ID', async () => {
|
106 | 144 | // suffix must match
|
107 | 145 | const suffix = `/status-lists/${uuid()}`;
|
|
0 commit comments