From 1154f4a4bd3ce586ecbeb2c4ac38a1c950b10fb2 Mon Sep 17 00:00:00 2001
From: Alan Shaw <alan.shaw@protocol.ai>
Date: Mon, 11 Feb 2019 10:35:26 +0000
Subject: [PATCH 1/3] perf: use test profile

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
---
 package.json                           | 2 +-
 test/utils/interface-common-factory.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package.json b/package.json
index 24e10c409..962d7c383 100644
--- a/package.json
+++ b/package.json
@@ -84,7 +84,7 @@
     "eslint-plugin-react": "^7.11.1",
     "go-ipfs-dep": "~0.4.18",
     "interface-ipfs-core": "~0.96.0",
-    "ipfsd-ctl": "~0.40.0",
+    "ipfsd-ctl": "github:ipfs/js-ipfsd-ctl#feat/support-profile",
     "nock": "^10.0.2",
     "pull-stream": "^3.6.9",
     "stream-equal": "^1.1.1"
diff --git a/test/utils/interface-common-factory.js b/test/utils/interface-common-factory.js
index db3960e59..ad5010080 100644
--- a/test/utils/interface-common-factory.js
+++ b/test/utils/interface-common-factory.js
@@ -9,7 +9,7 @@ function createFactory (options) {
   options = options || {}
 
   options.factoryOptions = options.factoryOptions || {}
-  options.spawnOptions = options.spawnOptions || { initOptions: { bits: 1024 } }
+  options.spawnOptions = options.spawnOptions || { initOptions: { bits: 1024, profile: 'test' } }
 
   const ipfsFactory = IPFSFactory.create(options.factoryOptions)
 

From b8c80e4bd405eb2867c1c1ce4e357ab6b2b1b0fa Mon Sep 17 00:00:00 2001
From: Alan Shaw <alan.shaw@protocol.ai>
Date: Tue, 12 Feb 2019 09:20:20 +0000
Subject: [PATCH 2/3] refactor: use test profile in all possible tests

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
---
 test/commands.spec.js          | 2 +-
 test/constructor.spec.js       | 2 +-
 test/custom-headers.spec.js    | 2 +-
 test/dag.spec.js               | 2 +-
 test/diag.spec.js              | 2 +-
 test/files-mfs.spec.js         | 2 +-
 test/get.spec.js               | 2 +-
 test/key.spec.js               | 2 +-
 test/log.spec.js               | 2 +-
 test/name.spec.js              | 4 ++--
 test/ping.spec.js              | 4 ++--
 test/pubsub-in-browser.spec.js | 2 +-
 test/refs.spec.js              | 2 +-
 test/repo.spec.js              | 2 +-
 test/stats.spec.js             | 2 +-
 test/util.spec.js              | 2 +-
 16 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/test/commands.spec.js b/test/commands.spec.js
index dd97269ba..3fb4f02e0 100644
--- a/test/commands.spec.js
+++ b/test/commands.spec.js
@@ -17,7 +17,7 @@ describe('.commands', function () {
   let ipfs
 
   before((done) => {
-    f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+    f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
       expect(err).to.not.exist()
       ipfsd = _ipfsd
       ipfs = ipfsClient(_ipfsd.apiAddr)
diff --git a/test/constructor.spec.js b/test/constructor.spec.js
index f14d9635c..ab3ad26a2 100644
--- a/test/constructor.spec.js
+++ b/test/constructor.spec.js
@@ -84,7 +84,7 @@ describe('ipfs-http-client constructor tests', () => {
     before(function (done) {
       this.timeout(60 * 1000) // slow CI
 
-      f.spawn({ initOptions: { bits: 1024 } }, (err, node) => {
+      f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, node) => {
         expect(err).to.not.exist()
         ipfsd = node
         apiAddr = node.apiAddr.toString()
diff --git a/test/custom-headers.spec.js b/test/custom-headers.spec.js
index bda3c60b0..1e1748515 100644
--- a/test/custom-headers.spec.js
+++ b/test/custom-headers.spec.js
@@ -18,7 +18,7 @@ describe('custom headers', function () {
   let ipfsd
   // initialize ipfs with custom headers
   before(done => {
-    f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+    f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
       expect(err).to.not.exist()
       ipfsd = _ipfsd
       ipfs = ipfsClient({
diff --git a/test/dag.spec.js b/test/dag.spec.js
index 9c92c2d14..0b1a2f314 100644
--- a/test/dag.spec.js
+++ b/test/dag.spec.js
@@ -21,7 +21,7 @@ describe('.dag', function () {
   this.timeout(20 * 1000)
   before(function (done) {
     series([
-      (cb) => f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+      (cb) => f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
         expect(err).to.not.exist()
         ipfsd = _ipfsd
         ipfs = ipfsClient(_ipfsd.apiAddr)
diff --git a/test/diag.spec.js b/test/diag.spec.js
index c3afffe05..3f12106e0 100644
--- a/test/diag.spec.js
+++ b/test/diag.spec.js
@@ -20,7 +20,7 @@ describe('.diag', function () {
   let ipfs
 
   before((done) => {
-    f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+    f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
       expect(err).to.not.exist()
       ipfsd = _ipfsd
       ipfs = ipfsClient(_ipfsd.apiAddr)
diff --git a/test/files-mfs.spec.js b/test/files-mfs.spec.js
index 38fc35a40..b550105a6 100644
--- a/test/files-mfs.spec.js
+++ b/test/files-mfs.spec.js
@@ -38,7 +38,7 @@ describe('.files (the MFS API part)', function () {
   const expectedMultihash = 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP'
 
   before((done) => {
-    f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+    f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
       expect(err).to.not.exist()
       ipfsd = _ipfsd
       ipfs = ipfsClient(_ipfsd.apiAddr)
diff --git a/test/get.spec.js b/test/get.spec.js
index 84abf5c80..c789ce971 100644
--- a/test/get.spec.js
+++ b/test/get.spec.js
@@ -31,7 +31,7 @@ describe('.get (specific go-ipfs features)', function () {
 
   before(function (done) {
     series([
-      (cb) => f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+      (cb) => f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
         expect(err).to.not.exist()
         ipfsd = _ipfsd
         ipfs = ipfsClient(_ipfsd.apiAddr)
diff --git a/test/key.spec.js b/test/key.spec.js
index 5c729a90e..8ed35d42b 100644
--- a/test/key.spec.js
+++ b/test/key.spec.js
@@ -17,7 +17,7 @@ describe('.key', function () {
   let ipfs
 
   before((done) => {
-    f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+    f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
       expect(err).to.not.exist()
       ipfsd = _ipfsd
       ipfs = ipfsClient(_ipfsd.apiAddr)
diff --git a/test/log.spec.js b/test/log.spec.js
index ebccc029c..16782d66a 100644
--- a/test/log.spec.js
+++ b/test/log.spec.js
@@ -17,7 +17,7 @@ describe('.log', function () {
   let ipfs
 
   before((done) => {
-    f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+    f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
       expect(err).to.not.exist()
       ipfsd = _ipfsd
       ipfs = ipfsClient(_ipfsd.apiAddr)
diff --git a/test/name.spec.js b/test/name.spec.js
index 3b352e6b9..67c19f94a 100644
--- a/test/name.spec.js
+++ b/test/name.spec.js
@@ -28,7 +28,7 @@ describe('.name', () => {
 
     series([
       (cb) => {
-        f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+        f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
           expect(err).to.not.exist()
           ipfsd = _ipfsd
           ipfs = ipfsClient(_ipfsd.apiAddr)
@@ -36,7 +36,7 @@ describe('.name', () => {
         })
       },
       (cb) => {
-        f.spawn({ initOptions: { bits: 1024 } }, (err, node) => {
+        f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, node) => {
           expect(err).to.not.exist()
           other = node.api
           otherd = node
diff --git a/test/ping.spec.js b/test/ping.spec.js
index 2dede0328..c8a856e13 100644
--- a/test/ping.spec.js
+++ b/test/ping.spec.js
@@ -34,7 +34,7 @@ describe('.ping', function () {
 
     series([
       (cb) => {
-        f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+        f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
           expect(err).to.not.exist()
           ipfsd = _ipfsd
           ipfs = ipfsClient(_ipfsd.apiAddr)
@@ -42,7 +42,7 @@ describe('.ping', function () {
         })
       },
       (cb) => {
-        f.spawn({ initOptions: { bits: 1024 } }, (err, node) => {
+        f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, node) => {
           expect(err).to.not.exist()
           other = node.api
           otherd = node
diff --git a/test/pubsub-in-browser.spec.js b/test/pubsub-in-browser.spec.js
index 0f7dc3ce7..ff1a22347 100644
--- a/test/pubsub-in-browser.spec.js
+++ b/test/pubsub-in-browser.spec.js
@@ -47,7 +47,7 @@ describe('.pubsub is not supported in the browser, yet!', function () {
   let ipfsd
 
   before((done) => {
-    f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+    f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
       expect(err).to.not.exist()
       ipfsd = _ipfsd
       ipfs = ipfsClient(_ipfsd.apiAddr)
diff --git a/test/refs.spec.js b/test/refs.spec.js
index 06fe10142..9ffcf4ebe 100644
--- a/test/refs.spec.js
+++ b/test/refs.spec.js
@@ -35,7 +35,7 @@ describe('.refs', function () {
     }
 
     waterfall([
-      (cb) => f.spawn({ initOptions: { bits: 1024 } }, cb),
+      (cb) => f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, cb),
       (_ipfsd, cb) => {
         ipfsd = _ipfsd
         ipfs = ipfsClient(_ipfsd.apiAddr)
diff --git a/test/repo.spec.js b/test/repo.spec.js
index 142ff5659..e01868810 100644
--- a/test/repo.spec.js
+++ b/test/repo.spec.js
@@ -16,7 +16,7 @@ describe('.repo', function () {
   let ipfsd
 
   before((done) => {
-    f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+    f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
       expect(err).to.not.exist()
       ipfsd = _ipfsd
       ipfs = ipfsClient(_ipfsd.apiAddr)
diff --git a/test/stats.spec.js b/test/stats.spec.js
index 4c93da490..4597e0397 100644
--- a/test/stats.spec.js
+++ b/test/stats.spec.js
@@ -16,7 +16,7 @@ describe('stats', function () {
   let ipfsd
 
   before((done) => {
-    f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+    f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
       expect(err).to.not.exist()
       ipfsd = _ipfsd
       ipfs = ipfsClient(_ipfsd.apiAddr)
diff --git a/test/util.spec.js b/test/util.spec.js
index 002a7777f..9915c2940 100644
--- a/test/util.spec.js
+++ b/test/util.spec.js
@@ -20,7 +20,7 @@ describe('.util', () => {
   before(function (done) {
     this.timeout(20 * 1000) // slow CI
 
-    f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => {
+    f.spawn({ initOptions: { bits: 1024, profile: 'test' } }, (err, _ipfsd) => {
       expect(err).to.not.exist()
       ipfsd = _ipfsd
       ipfs = ipfsClient(_ipfsd.apiAddr)

From 302a1b466cab86b5e522a6cf7a4c5e4cd3ba37eb Mon Sep 17 00:00:00 2001
From: Alan Shaw <alan.shaw@protocol.ai>
Date: Tue, 12 Feb 2019 09:26:40 +0000
Subject: [PATCH 3/3] chore: use latest ipfsd-ctl

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 962d7c383..4200d5b60 100644
--- a/package.json
+++ b/package.json
@@ -84,7 +84,7 @@
     "eslint-plugin-react": "^7.11.1",
     "go-ipfs-dep": "~0.4.18",
     "interface-ipfs-core": "~0.96.0",
-    "ipfsd-ctl": "github:ipfs/js-ipfsd-ctl#feat/support-profile",
+    "ipfsd-ctl": "github:ipfs/js-ipfsd-ctl",
     "nock": "^10.0.2",
     "pull-stream": "^3.6.9",
     "stream-equal": "^1.1.1"