Skip to content

Commit

Permalink
fix: more test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alanshaw committed Nov 11, 2024
1 parent 2a07267 commit a9375e3
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/access-client/test/agent-use-cases.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe('authorizeWaitAndClaim', async function () {
describe('getAccountPlan', async function () {
const accountWithAPlan = 'did:mailto:example.com:i-have-a-plan'
const accountWithoutAPlan = 'did:mailto:example.com:i-have-no-plan'
const product = 'did:web:test.storacha.network'
const product = 'did:web:test.upload.storacha.network'
/** @type {Record<Ucanto.DID, {product: Ucanto.DID, updatedAt: string}>} */
const plans = {
[accountWithAPlan]: {
Expand Down
34 changes: 17 additions & 17 deletions packages/capabilities/test/capabilities/provider.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('provider/add', function () {
audience: service,
with: account,
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: space.did(),
},
proofs: await createAuthorization({ agent, service, account }),
Expand All @@ -36,7 +36,7 @@ describe('provider/add', function () {
assert.deepEqual(result.ok.audience.did(), service.did())
assert.equal(result.ok.capability.can, 'provider/add')
assert.deepEqual(result.ok.capability.nb, {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: space.did(),
})
}
Expand All @@ -51,7 +51,7 @@ describe('provider/add', function () {
audience: service,
with: account,
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: space.did(),
},
})
Expand Down Expand Up @@ -80,7 +80,7 @@ describe('provider/add', function () {
audience: service,
with: account,
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: space.did(),
},
proofs: [delegation],
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('provider/add', function () {
audience: service,
with: account,
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: space.did(),
},
proofs: [attestation],
Expand All @@ -135,7 +135,7 @@ describe('provider/add', function () {
with: bobAccount.did(),
// @ts-ignore
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
},
})
}, /Error: Invalid 'nb' - Object contains invalid field "consumer"/)
Expand All @@ -149,7 +149,7 @@ describe('provider/add', function () {
audience: service,
with: bobAccount.did(),
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
// @ts-expect-error
consumer: 'did:mailto:storacha.network:user',
},
Expand All @@ -166,7 +166,7 @@ describe('provider/add', function () {
with: bobAccount.did(),
// @ts-expect-error - missing provider
nb: {
// provider: 'did:web:test.storacha.network',
// provider: 'did:web:test.upload.storacha.network',
consumer: bob.did(),
},
})
Expand Down Expand Up @@ -197,7 +197,7 @@ describe('provider/add', function () {
audience: service,
with: account,
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: space.did(),
},
proofs: [
Expand All @@ -206,7 +206,7 @@ describe('provider/add', function () {
audience: bob,
with: account,
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: space.did(),
},
proofs: await createAuthorization({ agent, service, account }),
Expand All @@ -233,7 +233,7 @@ describe('provider/add', function () {
audience: service,
with: account,
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: space.did(),
},
proofs: [
Expand All @@ -242,7 +242,7 @@ describe('provider/add', function () {
audience: bob,
with: account,
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
},
proofs: await createAuthorization({ agent, service, account }),
}),
Expand All @@ -268,7 +268,7 @@ describe('provider/add', function () {
audience: service,
with: account,
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: space.did(),
},
proofs: [
Expand Down Expand Up @@ -303,7 +303,7 @@ describe('provider/add', function () {
audience: service,
with: account,
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: bob.did(),
},
proofs: [
Expand Down Expand Up @@ -338,7 +338,7 @@ describe('provider/add', function () {
audience: service,
with: account,
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: bob.did(),
},
proofs: [
Expand Down Expand Up @@ -379,7 +379,7 @@ describe('provider/add', function () {
audience: service,
with: 'did:mailto:mallory.com:bob',
nb: {
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
consumer: bob.did(),
},
proofs: [
Expand Down Expand Up @@ -428,7 +428,7 @@ describe('provider/add', function () {
with: account.did(),
nb: {
consumer: space.did(),
provider: 'did:web:test.storacha.network',
provider: 'did:web:test.upload.storacha.network',
},
// NOTE: no proofs!
})
Expand Down
2 changes: 1 addition & 1 deletion packages/capabilities/test/helpers/fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const malloryAccount = Absentee.from({

export const service = Signer.parse(
'MgCYKXoHVy7Vk4/QjcEGi+MCqjntUiasxXJ8uJKY0qh11e+0Bs8WsdqGK7xothgrDzzWD0ME7ynPjz2okXDh8537lId8='
).withDID('did:web:test.storacha.network')
).withDID('did:web:test.upload.storacha.network')

export const readmeCID = parseLink(
'bafybeihqfdg2ereoijjoyrqzr2x2wsasqm2udurforw7pa3tvbnxhojao4'
Expand Down
2 changes: 1 addition & 1 deletion packages/upload-api/test/handlers/plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const test = {
'an account can get plan information': async (assert, context) => {
const account = 'did:mailto:example.com:alice'
const billingID = 'stripe:abc123'
const product = 'did:web:test.storacha.network'
const product = 'did:web:test.upload.storacha.network'
await context.plansStorage.initialize(account, billingID, product)
const connection = connect({
id: context.id,
Expand Down
2 changes: 1 addition & 1 deletion packages/upload-api/test/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const w3 = ed25519
.parse(
'MgCYKXoHVy7Vk4/QjcEGi+MCqjntUiasxXJ8uJKY0qh11e+0Bs8WsdqGK7xothgrDzzWD0ME7ynPjz2okXDh8537lId8='
)
.withDID('did:web:test.storacha.network')
.withDID('did:web:test.upload.storacha.network')

/**
* Creates a server for the given service.
Expand Down
2 changes: 1 addition & 1 deletion packages/upload-api/test/storage/provisions-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class ProvisionsStorage {
*
* @param {Array<Types.ServiceDID | string>} providers
*/
constructor(providers = ['did:web:test.storacha.network']) {
constructor(providers = ['did:web:test.upload.storacha.network']) {
/**
* @type {Record<string, Types.Provision>}
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/upload-api/test/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const service = ed25519
.parse(
'MgCYKXoHVy7Vk4/QjcEGi+MCqjntUiasxXJ8uJKY0qh11e+0Bs8WsdqGK7xothgrDzzWD0ME7ynPjz2okXDh8537lId8='
)
.withDID('did:web:test.storacha.network')
.withDID('did:web:test.upload.storacha.network')

/**
* @param {import('@ucanto/interface').Principal} audience
Expand Down
4 changes: 2 additions & 2 deletions packages/w3up-client/test/coupon.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const testCoupon = Test.withContext({
const account = await login

// Then we setup a billing for this account
await plansStorage.set(account.did(), 'did:web:test.storacha.network')
await plansStorage.set(account.did(), 'did:web:test.upload.storacha.network')

// Then we use the account to issue a coupon for the workshop
const coupon = await client.coupon.issue({
Expand Down Expand Up @@ -45,7 +45,7 @@ export const testCoupon = Test.withContext({

const info = await alice.capability.space.info(space.did())
assert.deepEqual(info.did, space.did())
assert.deepEqual(info.providers, ['did:web:test.storacha.network'])
assert.deepEqual(info.providers, ['did:web:test.upload.storacha.network'])
},

'coupon with password': async (
Expand Down

0 comments on commit a9375e3

Please sign in to comment.