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

Fix failing gateway tests with this one simple trick! #1006

Merged
merged 3 commits into from
Sep 8, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions test/gateway/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ chai.use(dirtyChai)
const series = require('async/series')
const API = require('../../src/http')
const loadFixture = require('aegir/fixtures')
const os = require('os')
const path = require('path')

const bigFile = loadFixture(__dirname, '../../node_modules/interface-ipfs-core/test/fixtures/15mb.random', 'ipfs')
const directoryContent = {
Expand All @@ -24,12 +22,7 @@ describe('HTTP Gateway', () => {
let gateway

before((done) => {
const repoPath = path.join(
os.tmpdir(),
'/ipfs-' + Math.random().toString().substring(2, 8) + '-' + Date.now()
)

http.api = new API(repoPath, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect, explanation why here -> #968 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diasdavid okay, Got it, I'll make sure tests are self-contained and don't use the local repo. Sorry for misunderstanding.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries at all :) Thank you for working on the fix.

http.api = new API(undefined, {
Bootstrap: [],
Discovery: {
MDNS: {
Expand Down