This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
dedupe tests #2669
Closed
Closed
dedupe tests #2669
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* eslint-disable complexity */ | ||
'use strict' | ||
|
||
const promisify = require('promisify-es6') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,17 @@ | ||
/* eslint-env mocha */ | ||
'use strict' | ||
|
||
const { expect } = require('interface-ipfs-core/src/utils/mocha') | ||
// const { expect } = require('interface-ipfs-core/src/utils/mocha') | ||
const runOnAndOff = require('../utils/on-and-off') | ||
const isIPFS = require('is-ipfs') | ||
// const isIPFS = require('is-ipfs') | ||
|
||
describe('dns', () => runOnAndOff((thing) => { | ||
let ipfs | ||
// let ipfs | ||
|
||
before(function () { | ||
this.timeout(60 * 1000) | ||
ipfs = thing.ipfs | ||
// ipfs = thing.ipfs | ||
}) | ||
|
||
it('recursively resolve ipfs.io dns', async function () { | ||
this.timeout(60 * 1000) | ||
|
||
const res = await ipfs('dns ipfs.io') | ||
expect(res.substr(0, 6)).to.eql('/ipfs/') | ||
const resultingDomainOrCid = res.split('/')[2].trim() | ||
expect(isIPFS.cid(resultingDomainOrCid)).to.eql(true) | ||
}) | ||
|
||
it('recursively resolve _dnslink.ipfs.io dns', async function () { | ||
this.timeout(60 * 1000) | ||
|
||
const res = await ipfs('dns _dnslink.ipfs.io') | ||
expect(res.substr(0, 6)).to.eql('/ipfs/') | ||
const resultingDomainOrCid = res.split('/')[2].trim() | ||
expect(isIPFS.cid(resultingDomainOrCid)).to.eql(true) | ||
}) | ||
|
||
it('non-recursive resolve ipfs.io', async function () { | ||
this.timeout(60 * 1000) | ||
|
||
const res = await ipfs('dns --recursive false ipfs.io') | ||
expect(res.substr(0, 6)).to.eql('/ipns/') | ||
const resultingDomainOrCid = res.split('/')[2].trim() | ||
expect(isIPFS.cid(resultingDomainOrCid)).to.eql(false) | ||
}) | ||
|
||
it('resolve subdomain docs.ipfs.io dns', async function () { | ||
this.timeout(60 * 1000) | ||
|
||
const res = await ipfs('dns docs.ipfs.io') | ||
expect(res.substr(0, 6)).to.eql('/ipfs/') | ||
}) | ||
|
||
it('resolve subdomain _dnslink.docs.ipfs.io dns', async function () { | ||
this.timeout(60 * 1000) | ||
|
||
const res = await ipfs('dns _dnslink.docs.ipfs.io') | ||
expect(res.substr(0, 6)).to.eql('/ipfs/') | ||
}) | ||
// TODO add smoke test plus maybe errors just to make sure this works | ||
})) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are quite a lot of TODOs being added here - how will they be resolved? By adding tests to these suites or the interface tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everything related to cli logic will be added to js-ipfs cli suite, everything that needed to be extracted to interface-core is already ipfs-inactive/interface-js-ipfs-core#573.
The comments may refer to new tests that need to be added by the follow up PRs but this is only related to the CLI tests.