From 3d2282d9ad0b570b913a70d215cd968019d912df Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Thu, 6 Aug 2015 16:38:32 -0700 Subject: [PATCH] fix imports for tests for tool-testing --- tools/tests/autoupdate.js | 2 +- tools/tests/old/test-bundler-assets.js | 2 +- tools/tests/old/test-bundler-npm.js | 2 +- tools/tests/old/test-bundler-options.js | 2 +- tools/tests/package-tests.js | 4 ++-- tools/tests/releases.js | 2 +- tools/tests/run.js | 2 +- tools/tests/source-maps.js | 2 +- tools/tool-testing/selftest.js | 8 ++++---- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/tests/autoupdate.js b/tools/tests/autoupdate.js index a1096d520c7..f22ee397fa6 100644 --- a/tools/tests/autoupdate.js +++ b/tools/tests/autoupdate.js @@ -1,6 +1,6 @@ var selftest = require('../tool-testing/selftest.js'); var config = require('../meteor-services/config.js'); -var catalogRemote = require('../catalog/catalog-remote.js'); +var catalogRemote = require('../packaging/catalog/catalog-remote.js'); var buildmessage = require('../utils/buildmessage.js'); var Sandbox = selftest.Sandbox; diff --git a/tools/tests/old/test-bundler-assets.js b/tools/tests/old/test-bundler-assets.js index b4c5c1cd4b4..df3a543dbb8 100644 --- a/tools/tests/old/test-bundler-assets.js +++ b/tools/tests/old/test-bundler-assets.js @@ -7,7 +7,7 @@ var files = require('../../fs/files.js'); var bundler = require('../../isobuild/bundler.js'); var isopackets = require('../../tool-env/isopackets.js'); var release = require('../../packaging/release.js'); -var catalog = require('../../catalog/catalog.js'); +var catalog = require('../../packaging/catalog/catalog.js'); var buildmessage = require('../../utils/buildmessage.js'); var projectContextModule = require('../../project-context.js'); diff --git a/tools/tests/old/test-bundler-npm.js b/tools/tests/old/test-bundler-npm.js index b0740b367e5..1caf634ad8e 100644 --- a/tools/tests/old/test-bundler-npm.js +++ b/tools/tests/old/test-bundler-npm.js @@ -6,7 +6,7 @@ var Fiber = require('fibers'); var files = require('../../fs/files.js'); var bundler = require('../../isobuild/bundler.js'); var release = require('../../packaging/release.js'); -var catalog = require('../../catalog/catalog.js'); +var catalog = require('../../packaging/catalog/catalog.js'); var buildmessage = require('../../utils/buildmessage.js'); var meteorNpm = require('../../isobuild/meteor-npm.js'); var isopackets = require('../../tool-env/isopackets.js'); diff --git a/tools/tests/old/test-bundler-options.js b/tools/tests/old/test-bundler-options.js index 746d672c84e..a7e504507ed 100644 --- a/tools/tests/old/test-bundler-options.js +++ b/tools/tests/old/test-bundler-options.js @@ -5,7 +5,7 @@ var assert = require('assert'); var bundler = require('../../isobuild/bundler.js'); var release = require('../../packaging/release.js'); var files = require('../../fs/files.js'); -var catalog = require('../../catalog/catalog.js'); +var catalog = require('../../packaging/catalog/catalog.js'); var buildmessage = require('../../utils/buildmessage.js'); var isopackets = require('../../tool-env/isopackets.js'); var projectContextModule = require('../../project-context.js'); diff --git a/tools/tests/package-tests.js b/tools/tests/package-tests.js index c199bd1e064..3cc8ba4fcec 100644 --- a/tools/tests/package-tests.js +++ b/tools/tests/package-tests.js @@ -6,7 +6,7 @@ var files = require('../fs/files.js'); var testUtils = require('../tool-testing/test-utils.js'); var utils = require('../utils/utils.js'); var packageClient = require('../packaging/package-client.js'); -var catalog = require('../catalog/catalog.js'); +var catalog = require('../packaging/catalog/catalog.js'); var DEFAULT_RELEASE_TRACK = catalog.DEFAULT_TRACK; @@ -474,7 +474,7 @@ selftest.define("update server package data unit test", var packageStorageFileDir = files.mkdtemp("update-server-package-data"); - var rC = require('../catalog/catalog-remote.js'); + var rC = require('../packaging/catalog/catalog-remote.js'); var config = require('../meteor-services/config.js'); var packageStorage = new rC.RemoteCatalog(); var packageStorageFile = config.getPackageStorage({ diff --git a/tools/tests/releases.js b/tools/tests/releases.js index 3b23b9354a9..2e5a495c3df 100644 --- a/tools/tests/releases.js +++ b/tools/tests/releases.js @@ -1,7 +1,7 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; var files = require('../fs/files.js'); -var catalog = require('../catalog/catalog.js'); +var catalog = require('../packaging/catalog/catalog.js'); var DEFAULT_RELEASE_TRACK = catalog.DEFAULT_TRACK; diff --git a/tools/tests/run.js b/tools/tests/run.js index d6fa2191886..244bc4c9515 100644 --- a/tools/tests/run.js +++ b/tools/tests/run.js @@ -5,7 +5,7 @@ var net = require('net'); var Future = require('fibers/future'); var _ = require('underscore'); var files = require('../fs/files.js'); -var catalog = require('../catalog/catalog.js'); +var catalog = require('../packaging/catalog/catalog.js'); var DEFAULT_RELEASE_TRACK = catalog.DEFAULT_TRACK; diff --git a/tools/tests/source-maps.js b/tools/tests/source-maps.js index 2cb7eca2c43..db7b5a576e6 100644 --- a/tools/tests/source-maps.js +++ b/tools/tests/source-maps.js @@ -1,7 +1,7 @@ var selftest = require('../tool-testing/selftest.js'); var Sandbox = selftest.Sandbox; var files = require('../fs/files.js'); -var catalog = require('../catalog/catalog.js'); +var catalog = require('../packaging/catalog/catalog.js'); function matchPath (text, doubleBS) { if (process.platform === 'win32') diff --git a/tools/tool-testing/selftest.js b/tools/tool-testing/selftest.js index d65120b31d4..ae3dc75564e 100644 --- a/tools/tool-testing/selftest.js +++ b/tools/tool-testing/selftest.js @@ -607,8 +607,8 @@ _.extend(Sandbox.prototype, { createApp: function (to, template, options) { var self = this; options = options || {}; - files.cp_r(files.pathJoin(files.convertToStandardPath(__dirname), 'tests', - 'apps', template), + files.cp_r(files.pathJoin( + files.convertToStandardPath(__dirname), '..', 'tests', 'apps', template), files.pathJoin(self.cwd, to), { ignore: [/^local$/] }); // If the test isn't explicitly managing a mock warehouse, ensure that apps @@ -652,7 +652,7 @@ _.extend(Sandbox.prototype, { var self = this; var packagePath = files.pathJoin(self.cwd, packageDir); var templatePackagePath = files.pathJoin( - files.convertToStandardPath(__dirname), 'tests', 'packages', template); + files.convertToStandardPath(__dirname), '..', 'tests', 'packages', template); files.cp_r(templatePackagePath, packagePath); _.each(files.readdir(packagePath), function (file) { @@ -1494,7 +1494,7 @@ var getAllTests = function () { // Load all files in the 'tests' directory that end in .js. They // are supposed to then call define() to register their tests. - var testdir = files.pathJoin(__dirname, 'tests'); + var testdir = files.pathJoin(__dirname, '..', 'tests'); var filenames = files.readdir(testdir); _.each(filenames, function (n) { if (! n.match(/^[^.].*\.js$/)) // ends in '.js', doesn't start with '.'