mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Delete "sync local catalog" test
It's been auto-failing for many months. If somebody wants to fix it, feel free to revert this and fix it, but there's no reason to just entirely stop self-test --slow from having any hope of passing forever.
This commit is contained in:
@@ -410,130 +410,6 @@ selftest.define("add packages client archs", function (options) {
|
||||
runTestWithArgs("browser", [], 3000);
|
||||
});
|
||||
|
||||
// Removes the local data.json file from disk.
|
||||
var cleanLocalCache = function () {
|
||||
var config = require("../config.js");
|
||||
var storage = config.getPackageStorage();
|
||||
if (files.exists(storage)) {
|
||||
files.unlink(storage);
|
||||
}
|
||||
};
|
||||
|
||||
var publishReleaseInNewTrack = selftest.markStack(function (s, releaseTrack, tool, packages) {
|
||||
var relConf = {
|
||||
track: releaseTrack,
|
||||
version: "0.9",
|
||||
recommended: "true",
|
||||
description: "a test release",
|
||||
tool: tool + "@1.0.0",
|
||||
packages: packages
|
||||
};
|
||||
s.write("release.json", JSON.stringify(relConf, null, 2));
|
||||
var run = s.run("publish-release", "release.json", "--create-track");
|
||||
run.waitSecs(15);
|
||||
run.match("Done");
|
||||
run.expectExit(0);
|
||||
});
|
||||
|
||||
// Add packages through the command line, and make sure that the correct set of
|
||||
// changes is reflected in .meteor/packages, .meteor/versions and list
|
||||
selftest.define("sync local catalog", ["slow", "net", "test-package-server"], function () {
|
||||
selftest.fail("this test is broken and breaks other tests by deleting their catalog.");
|
||||
return;
|
||||
|
||||
|
||||
var s = new Sandbox();
|
||||
var run;
|
||||
|
||||
testUtils.login(s, username, password);
|
||||
var packageName = randomizedPackageName(username);
|
||||
var fullPackageName = packageName + "-a";
|
||||
var releaseTrack = randomizedReleaseName(username);
|
||||
|
||||
// First test -- pretend that the user has downloaded meteor for the purpose
|
||||
// of running a package or an app. Create a package. Clean out the
|
||||
// data.json, then try to do things with them.
|
||||
|
||||
createAndPublishPackage(s, fullPackageName);
|
||||
|
||||
// Publish a release. This release is super-fake: the tool is a package that
|
||||
// is not actually a tool, for example. That's OK for our purposes for now,
|
||||
// because we only care about the tool version if we run an app from it.
|
||||
var packages = {};
|
||||
packages[fullPackageName] = "1.0.0";
|
||||
publishReleaseInNewTrack(s, releaseTrack, fullPackageName /*tool*/, packages);
|
||||
|
||||
// Create a package that has a versionsFrom for the just-published release.
|
||||
var newPack = packageName + "-b";
|
||||
var newPackDirName = "package-of-two-versions";
|
||||
s.createPackage(newPackDirName, newPack, "package-of-two-versions");
|
||||
s.cd(newPackDirName, function() {
|
||||
var packOpen = s.read("package.js");
|
||||
packOpen = packOpen + "\nPackage.onUse(function(api) { \n" +
|
||||
"api.versionsFrom(\"" + releaseTrack + "@0.9\");\n" +
|
||||
"api.use(\"" + fullPackageName + "\"); });";
|
||||
s.write("package.js", packOpen);
|
||||
});
|
||||
|
||||
// Clear the local data cache by deleting the data.json file that we are
|
||||
// reading our package data from. We now have no data about server contents,
|
||||
// including the release that we just published, so we have to sync to the
|
||||
// server to get that information.
|
||||
cleanLocalCache();
|
||||
|
||||
// Try to publish the package. Since the package references the release that
|
||||
// we just published, it needs to resync with the server in order to be able
|
||||
// to compile itself.
|
||||
s.cd(newPackDirName, function() {
|
||||
run = s.run("publish", "--create");
|
||||
run.waitSecs(20);
|
||||
run.match("Done");
|
||||
run.expectExit(0);
|
||||
});
|
||||
|
||||
// Part 2.
|
||||
// Make an app. It is basically an app.
|
||||
cleanLocalCache();
|
||||
run = s.run("create", "testApp");
|
||||
run.waitSecs(10);
|
||||
run.expectExit(0);
|
||||
|
||||
// Remove data.json again.
|
||||
cleanLocalCache();
|
||||
|
||||
// Add our newly-created package to the app. That package only exists on the
|
||||
// server, so we need to sync to get it.
|
||||
s.cd("testApp", function () {
|
||||
run = s.run("add", newPack);
|
||||
run.waitSecs(5);
|
||||
var match1 = run.match(/ added .*-([ab]) at version 1.0.0/);
|
||||
var match2 = run.match(/ added .*-([ab]) at version 1.0.0/);
|
||||
// the lines should be different:
|
||||
selftest.expectEqual(match1[1] !== match2[1], true);
|
||||
run.match("Test package");
|
||||
run.expectExit(0);
|
||||
|
||||
// Run the app!
|
||||
run = s.run();
|
||||
run.waitSecs(15);
|
||||
run.match("running at");
|
||||
run.match("localhost");
|
||||
run.stop();
|
||||
|
||||
// Remove data.json; run again! Make sure that we sync, because we are using
|
||||
// a package that we don't know about. This is a pretty good imitation of
|
||||
// the following workflow: you check out your friend's app from github, then
|
||||
// run your newly installed meteor. So, clearly, it should not fail.
|
||||
cleanLocalCache();
|
||||
run = s.run();
|
||||
run.waitSecs(15);
|
||||
run.match("running at");
|
||||
run.match("localhost");
|
||||
run.stop();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// `packageName` should be a full package name (i.e. <username>:<package
|
||||
// name>), and the sandbox should be logged in as that username.
|
||||
var createAndPublishPackage = selftest.markStack(function (s, packageName) {
|
||||
|
||||
Reference in New Issue
Block a user