Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 593cafa

Browse files
author
Alan Shaw
committed
test: unskip object tests
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 798a33f commit 593cafa

File tree

2 files changed

+15
-30
lines changed

2 files changed

+15
-30
lines changed

test/cli/object.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ describe('object', () => runOnAndOff((thing) => {
3434
})
3535
})
3636

37-
// TODO: unskip after switch to v1 CIDs by default
38-
it.skip('should new and print CID encoded in specified base', () => {
37+
it('should new and print CID encoded in specified base', () => {
3938
return ipfs('object new --cid-base=base64').then((out) => {
4039
expect(out).to.eql(
4140
'mAXASIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhV\n'
@@ -103,8 +102,7 @@ describe('object', () => runOnAndOff((thing) => {
103102
})
104103
})
105104

106-
// TODO: unskip after switch to v1 CIDs by default
107-
it.skip('should put and print CID encoded in specified base', () => {
105+
it('should put and print CID encoded in specified base', () => {
108106
return ipfs('object put test/fixtures/test-data/node.json --cid-base=base64')
109107
.then((out) => {
110108
expect(out).to.eql(
@@ -188,8 +186,7 @@ describe('object', () => runOnAndOff((thing) => {
188186
})
189187
})
190188

191-
// TODO: unskip after switch to v1 CIDs by default
192-
it.skip('should append-data and print CID encoded in specified base', () => {
189+
it('should append-data and print CID encoded in specified base', () => {
193190
return ipfs('object patch append-data QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n test/fixtures/test-data/badconfig --cid-base=base64').then((out) => {
194191
expect(out).to.eql(
195192
'mAXASIP+BZ7jGtaTyLGOs0xYcQvH7K9kVKEbyzXAkwLoZwrRj\n'
@@ -205,8 +202,7 @@ describe('object', () => runOnAndOff((thing) => {
205202
})
206203
})
207204

208-
// TODO: unskip after switch to v1 CIDs by default
209-
it.skip('should set-data and print CID encoded in specified base', () => {
205+
it('should set-data and print CID encoded in specified base', () => {
210206
return ipfs('object patch set-data QmfY37rjbPCZRnhvvJuQ46htW3VCAWziVB991P79h6WSv6 test/fixtures/test-data/badconfig --cid-base=base64').then((out) => {
211207
expect(out).to.eql(
212208
'mAXASIP+BZ7jGtaTyLGOs0xYcQvH7K9kVKEbyzXAkwLoZwrRj\n'
@@ -222,8 +218,7 @@ describe('object', () => runOnAndOff((thing) => {
222218
})
223219
})
224220

225-
// TODO: unskip after switch to v1 CIDs by default
226-
it.skip('should add-link and print CID encoded in specified base', () => {
221+
it('should add-link and print CID encoded in specified base', () => {
227222
return ipfs('object patch add-link QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n foo QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn --cid-base=base64').then((out) => {
228223
expect(out).to.eql(
229224
'mAXASIOEVPbXq2xYoEsRZhaPB61btcy1x359osjv4a2L/lgPs\n'
@@ -239,8 +234,7 @@ describe('object', () => runOnAndOff((thing) => {
239234
})
240235
})
241236

242-
// TODO: unskip after switch to v1 CIDs by default
243-
it.skip('should rm-link and print CID encoded in specified base', () => {
237+
it('should rm-link and print CID encoded in specified base', () => {
244238
return ipfs('object patch rm-link QmdVHE8fUD6FLNLugtNxqDFyhaCgdob372hs6BYEe75VAK foo --cid-base=base64').then((out) => {
245239
expect(out).to.eql(
246240
'mAXASIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhV\n'

test/http-api/inject/object.js

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ module.exports = (http) => {
3333
expect(res.result.Links).to.be.eql([])
3434
})
3535

36-
// TODO: unskip after switch to v1 CIDs by default
37-
it.skip('should create a new object and return a base64 encoded CID', async () => {
36+
it('should create a new object and return a base64 encoded CID', async () => {
3837
const res = await api.inject({
3938
method: 'POST',
4039
url: '/api/v0/object/new?cid-base=base64'
@@ -88,8 +87,7 @@ module.exports = (http) => {
8887
expect(res.result.Data).to.be.empty()
8988
})
9089

91-
// TODO: unskip after switch to v1 CIDs by default
92-
it.skip('should get object and return a base64 encoded CID', async () => {
90+
it('should get object and return a base64 encoded CID', async () => {
9391
let res = await api.inject({
9492
method: 'POST',
9593
url: '/api/v0/object/new'
@@ -185,8 +183,7 @@ module.exports = (http) => {
185183
expect(res.result).to.eql(expectedResult)
186184
})
187185

188-
// TODO: unskip after switch to v1 CIDs by default
189-
it.skip('should put data and return a base64 encoded CID', async () => {
186+
it('should put data and return a base64 encoded CID', async () => {
190187
const form = new FormData()
191188
form.append('file', JSON.stringify({ Data: 'TEST' + Date.now(), Links: [] }), { filename: 'node.json' })
192189
const headers = form.getHeaders()
@@ -258,8 +255,7 @@ module.exports = (http) => {
258255
expect(res.result.CumulativeSize).to.equal(60 + 8)
259256
})
260257

261-
// TODO: unskip after switch to v1 CIDs by default
262-
it.skip('should stat object and return a base64 encoded CID', async () => {
258+
it('should stat object and return a base64 encoded CID', async () => {
263259
let res = await api.inject({
264260
method: 'POST',
265261
url: '/api/v0/object/new'
@@ -366,8 +362,7 @@ module.exports = (http) => {
366362
expect(res.result).to.deep.equal(expectedResult)
367363
})
368364

369-
// TODO: unskip after switch to v1 CIDs by default
370-
it.skip('should list object links and return a base64 encoded CID', async () => {
365+
it('should list object links and return a base64 encoded CID', async () => {
371366
let res = await api.inject({
372367
method: 'POST',
373368
url: '/api/v0/object/new'
@@ -509,8 +504,7 @@ module.exports = (http) => {
509504
expect(res.result).to.deep.equal(expectedResult)
510505
})
511506

512-
// TODO: unskip after switch to v1 CIDs by default
513-
it.skip('should append data to object and return a base64 encoded CID', async () => {
507+
it('should append data to object and return a base64 encoded CID', async () => {
514508
let res = await api.inject({
515509
method: 'POST',
516510
url: '/api/v0/object/new'
@@ -624,8 +618,7 @@ module.exports = (http) => {
624618
expect(res.result).to.deep.equal(expectedResult)
625619
})
626620

627-
// TODO: unskip after switch to v1 CIDs by default
628-
it.skip('should set data for object and return a base64 encoded CID', async () => {
621+
it('should set data for object and return a base64 encoded CID', async () => {
629622
let res = await api.inject({
630623
method: 'POST',
631624
url: '/api/v0/object/new'
@@ -731,8 +724,7 @@ module.exports = (http) => {
731724
})
732725
})
733726

734-
// TODO: unskip after switch to v1 CIDs by default
735-
it.skip('should add a link to an object and return a base64 encoded CID', async () => {
727+
it('should add a link to an object and return a base64 encoded CID', async () => {
736728
let res = await api.inject({
737729
method: 'POST',
738730
url: '/api/v0/object/new'
@@ -820,8 +812,7 @@ module.exports = (http) => {
820812
expect(res.result.Hash).to.equal('QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n')
821813
})
822814

823-
// TODO: unskip after switch to v1 CIDs by default
824-
it.skip('should remove a link from an object and return a base64 encoded CID', async () => {
815+
it('should remove a link from an object and return a base64 encoded CID', async () => {
825816
const linkName = 'TEST' + Date.now()
826817

827818
let res = await api.inject({

0 commit comments

Comments
 (0)