[OC-4668] add functional tests for deploy_revision#468
Conversation
There was a problem hiding this comment.
I think it would be worth commenting why you're expecting this result in restart.txt.
There was a problem hiding this comment.
I think making the content here "callback_order.inspect" suggests to the reader that it's special somehow. Why not just make it "example after restart", so it's clear that it's not important, nor will it be tested later, that it's related to callback order?
There was a problem hiding this comment.
A comment that the value isn't checked seems worthwhile. The nice thing about doing this is that you'll get diff output when you run the tests:
Cloning into '/var/folders/c5/_9tvqbxd5730d8pjq9cmnnyh0000gq/T/d20121102-31924-12824kr/shared/cached-copy'...
--- /var/folders/c5/_9tvqbxd5730d8pjq9cmnnyh0000gq/T/chef-tempfile20121102-31924-an4sn7 2012-11-02 13:34:46.000000000 -0700
+++ /var/folders/c5/_9tvqbxd5730d8pjq9cmnnyh0000gq/T/chef-diff20121102-31924-dm4cim 2012-11-02 13:34:46.000000000 -0700
@@ -0,0 +1 @@
+[:before_migrate]
\ No newline at end of file
--- /var/folders/c5/_9tvqbxd5730d8pjq9cmnnyh0000gq/T/chef-tempfile20121102-31924-hnk770 2012-11-02 13:34:46.000000000 -0700
+++ /var/folders/c5/_9tvqbxd5730d8pjq9cmnnyh0000gq/T/chef-diff20121102-31924-1xvxk2e 2012-11-02 13:34:46.000000000 -0700
@@ -0,0 +1 @@
+[:before_migrate, :before_symlink]
\ No newline at end of file
--- /var/folders/c5/_9tvqbxd5730d8pjq9cmnnyh0000gq/T/chef-tempfile20121102-31924-1kn3lea 2012-11-02 13:34:46.000000000 -0700
+++ /var/folders/c5/_9tvqbxd5730d8pjq9cmnnyh0000gq/T/chef-diff20121102-31924-ra1wle 2012-11-02 13:34:46.000000000 -0700
@@ -0,0 +1 @@
+[:before_migrate, :before_symlink, :before_restart]
\ No newline at end of file
--- /var/folders/c5/_9tvqbxd5730d8pjq9cmnnyh0000gq/T/chef-tempfile20121102-31924-16fk0bj 2012-11-02 13:34:46.000000000 -0700
+++ /var/folders/c5/_9tvqbxd5730d8pjq9cmnnyh0000gq/T/chef-diff20121102-31924-xybfwq 2012-11-02 13:34:46.000000000 -0700
@@ -0,0 +1 @@
+[:before_migrate, :before_symlink, :before_restart, :after_restart]
\ No newline at end of file
In the case that a code change breaks the order, you would get a hint about what's going on by looking at this.
* Use a single file to track order of operations between different steps in the tests * Use symbolic names when tracking order of operations so it's more human readable * Mark tests as unix_only, deploy doesn't support windows * Add tests that run a "migration"
There was a problem hiding this comment.
This feels a little odd just sitting out here in the wind. Move to before block, and @ohai ?
There was a problem hiding this comment.
it's a hack so ohai only runs once. before(:all) might work.
|
Merged this, dunno why github didn't pick it up. @timh, all of your comments were addressed in final commit. |
Revert version pins in chef-dk.
Functional tests for deploy_revision.
Exercises
:deployand:force_deployfor first deploy w/ or w/o existing directory structure, redeploy at same version, force deploy at the same version, and redeploy to an old version ("implicit rollback").