Commit Graph

152 Commits

Author SHA1 Message Date
Emily Stark
7336bf901b bump some self-test timeouts 2014-06-16 18:15:38 -07:00
Felix Rabe
3431c66c16 Fix occurrences of "cd dirname $0"
They are not safe for spaces in paths. There might be other places to look for trouble.

I've run the following command to produce this commit: (on OS X, copy-and-pasting the below exactly)

    find . -type f -name '*.sh' -print0  |  # Find all .sh files
        xargs -0 fgrep -H -- '`'         |  # See all places with backticks in them
        fgrep 'cd `dirname $0'           |  # I deemed these problematic (variable assignments are safe)
        cut -d ':' -f 1                  |  # Take the <file> from <file>:<line> produced by "grep -H"
        tr '\n' '\0'                     |  # Also here, spaces can be problematic - always do "xargs -0"!
        xargs -0 -- sed -i '' 's/cd `dirname $0`/cd "`dirname "$0"`"/g'

The significance of adding the two levels of "'s can be verified by running the following in your Terminal:

    $ node -e 'console.log(process.argv.splice(1))' -- `echo 1   2`
    [ '1', '2' ]

    $ node -e 'console.log(process.argv.splice(1))' -- "`echo 1   2`"
    [ '1 2' ]

    $ node -e 'console.log(process.argv.splice(1))' -- "`echo "1   2"`"
    [ '1   2' ]
2014-05-07 17:51:09 -07:00
David Glasser
314c8a1a34 We no longer need to pass --force to npm install
(Also, make a test assertion useful: assert.equal's default truncation
is horrible.)
2014-04-30 18:03:53 -07:00
Emily Stark
2b27950619 Add a basic test for 'meteor list-sites' 2014-04-17 16:58:08 -07:00
David Glasser
72c9657b0e Test that observeChanges works over a failover 2014-04-10 16:56:32 -07:00
David Glasser
498e572230 Make self-test less flaky with more waits. 2014-04-07 20:09:30 -07:00
David Glasser
3405644027 Fix runner.stop() while waiting for file change
Before this, if the runner decided to stop (eg, because mongod is
crashing too much) while waiting for file change, it would crash due to
an attempt to wait within a fiber.  Fixing that bug by adding an inFiber
would then lead to the process just not exiting, because nothing stops
the wait-specific future.
2014-04-02 21:16:59 -07:00
David Glasser
d287d36bac Make run tests less flaky 2014-03-31 20:03:01 -07:00
Andrew Wilcox
6f4f723c6a Allow user to set heartbeat interval to 0 to disable sending pings.
Add test flag `_respondToPings` which allows tests to disable
responding to pings.
2014-03-30 20:03:29 -07:00
Andrew Wilcox
8709365598 Stop heartbeats on client side disconnect.
Use heartbeatInterval: 0 to disable heartbeats for testing.

No need to add `_internal` to the public connection API because we
can get to the internal session through the server.
2014-03-30 20:03:29 -07:00
Andrew Wilcox
865eb30015 Move protocol out of heartbeat.js 2014-03-30 20:03:29 -07:00
Andrew Wilcox
0ac3bf9d4b Move the ddp-heartbeat test into tools/tests. 2014-03-30 20:03:29 -07:00
David Glasser
b2632d45c5 Move boilerplate HTML from tools to webapp
This breaks a strong dependency between the webapp package and the
bundler.  Now we can change the standard page format, add more hooks,
etc without changing the tools (and hot code push works properly).

This is an incompatible change to the definition of the
browser-program-pre1 format: it no longer contains a "page" field
pointing to a boilerplate defined using ad hoc ##FOO##
substitution. Instead, the manifest can contain "head" and "body"
entries for data added with compileStep.appendDocument().  (Note that in
Blaze, <body> in a template file no longer calls appendDocument.)

WebApp.addHtmlAttributeHook callbacks now return attribute objects (like
those that Spacebars supports) rather than strings.
2014-03-24 20:10:39 -07:00
Emily Stark
70689568f6 Make final logout unconditional for logs-mongo tests 2014-03-14 18:50:48 -07:00
Emily Stark
ff8abb4b04 Call logout in selftests that log in.
This avoids wracking up huge numbers of login tokens for the test
user. It would be nice to have these automatically cleaned up, but this
will do for now.
2014-03-14 18:50:48 -07:00
Emily Stark
85c7fa93e6 Add missing selftest 'var' 2014-03-14 18:50:48 -07:00
Emily Stark
e981b0c629 Bump run test timeouts 2014-02-26 14:26:13 -08:00
David Glasser
3cd00c89af Avoid stack trace with empty '.meteor/release' file
This is not a regression against 0.7.0.1.

Fixes #1849.
2014-02-21 15:00:33 -08:00
Emily Stark
222ac4ca65 Bump more self-test timeouts 2014-02-21 10:22:03 -08:00
Emily Stark
9669bbe368 Bump some run test timeouts 2014-02-20 17:25:14 -08:00
Emily Stark
ab3577d3d5 Update tests for changed accounts UX 2014-02-19 23:44:04 -08:00
Emily Stark
eee4c0c9e7 Add test for deploying with expired credentials 2014-02-19 19:36:54 -08:00
Emily Stark
1f8760acfc Update 'meteor claim' test for new prose 2014-02-19 15:52:31 -08:00
Emily Stark
2f6bb62170 Use the same timeouts in login tests as everywhere else 2014-02-19 15:49:06 -08:00
Emily Stark
2ef965f34e Merge remote-tracking branch 'origin/release-0.7.1' into meteor-accounts-ux-pass
Conflicts:
	History.md
	tools/help.txt
	tools/tests/login.js
	tools/tests/registration.js
2014-02-19 15:28:48 -08:00
Emily Stark
423ae65d93 This time, actually add the test for 'meteor whoami'. 2014-02-19 14:47:54 -08:00
Emily Stark
8f9f793c32 Add test for 'meteor deploy --settings' 2014-02-19 11:33:13 -08:00
Emily Stark
77b3d03b8f Add missing var in deploy test 2014-02-19 10:20:02 -08:00
Emily Stark
6b5dd8f61a Add test for whoami with no username set 2014-02-18 23:45:26 -08:00
Emily Stark
7e6505cf0a Add tests for authorized and claim with no username set 2014-02-18 23:45:26 -08:00
Emily Stark
e3675cb040 Fix timeouts on authorized/claim tests 2014-02-18 23:45:26 -08:00
Geoff Schmidt
d1d714ec66 'whoami' gracefully handles revocation of a credential
on a passwordless account. with test
2014-02-18 17:25:19 -08:00
Emily Stark
ec63838822 Change required number of deploy args.
Add tests for commands that require a site name.
2014-02-18 15:41:40 -08:00
Geoff Schmidt
bee4fbbd24 Reprompt if they enter a blank username to logs or mongo. With test. 2014-02-18 14:48:29 -08:00
Geoff Schmidt
dd2b5ce729 'login' without --galaxy always prompts for username/password 2014-02-18 14:17:41 -08:00
Emily Stark
9905a881f1 Remove an obsolete XXX 2014-02-18 11:04:21 -08:00
David Glasser
8b25a5b045 Merge branch 'restore-run-command' into devel 2014-02-17 19:48:20 -08:00
David Glasser
993fbc90cb run-command tests 2014-02-17 19:46:29 -08:00
Emily Stark
784a14de5b Add test for registering after logging out 2014-02-17 11:47:58 -08:00
Emily Stark
2ef499f583 Test that registration tokens are invalid after registration is completed 2014-02-17 11:10:53 -08:00
Emily Stark
bdd9e7e4b4 Add test for deferred registration with API token URL 2014-02-17 10:52:42 -08:00
Emily Stark
4cfd34d1e9 Fix my tweak to the npm self-test 2014-02-16 17:58:15 -08:00
Emily Stark
9694b585df Tweak npm self-test for update message on built release 2014-02-15 15:19:18 -08:00
Emily Stark
87f22606ff Factor our accounts command timeout in more places.
We've been seeing flakiness on login tests on different internet
connections, so now we can easily bump up the timeout (at the cost of
slowing down test failures).
2014-02-15 14:46:59 -08:00
Emily Stark
bc0b1ce53c Rename a test timeout variable and use it in more places.
Bump some more timeouts too.
2014-02-14 18:30:15 -08:00
Emily Stark
b04aa12d39 Make 'empty' a test app with no packages.
Rename previous 'empty' app to 'standard-app'.
2014-02-14 17:59:59 -08:00
Emily Stark
c248fcd673 Clarify registration test comment 2014-02-14 15:03:39 -08:00
Emily Stark
c847142344 Fix registration test error check 2014-02-14 15:02:51 -08:00
Emily Stark
708a818654 Fix typo in registration test comment 2014-02-14 15:01:22 -08:00
Emily Stark
e1548ed0cd Add first deferred registration test 2014-02-14 14:58:59 -08:00