acquia / moonshot

Moonshot: Because releasing services shouldn't be a moonshot!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spec fails: Moonshot::Stack#create

yitsushi opened this issue · comments


  1) Moonshot::Stack#create under normal circumstances when template_s3_bucket is set should call put_object and create_stack with template_url parameter
     Failure/Error:
       s3_client.put_object(
         bucket: @config.template_s3_bucket,
         key: s3_object_key,
         body: template.body
       )

       #<InstanceDouble(Aws::S3::Client) (anonymous)> received :put_object with unexpected arguments
         expected: (hash_including(:bucket=>"rspec-bucket", :key=>"rspec-app-staging-1483228800-template.yml", :body=>"an instance of String"))
              got: ({:body=>"---\n- Resources: \n- Parameters:\n  - Parent1:\n    - Type: String\n    - Description: This...ent stack on create.\n", :bucket=>"rspec-bucket", :key=>"rspec-app-staging-1483225200-template.yml"})
       Diff:
       @@ -1,2 +1,5 @@
       -["hash_including(:bucket=>\"rspec-bucket\", :key=>\"rspec-app-staging-1483228800-template.yml\", :body=>\"an instance of String\")"]
       +[{:body=>
       +   "---\n- Resources: \n- Parameters:\n  - Parent1:\n    - Type: String\n    - Description: This is imported from the parent stack on create.\n",
       +  :bucket=>"rspec-bucket",
       +  :key=>"rspec-app-staging-1483225200-template.yml"}]

     # ./lib/moonshot/stack.rb:188:in `block in upload_template_to_s3'
     # ./lib/moonshot/stack.rb:187:in `upload_template_to_s3'
     # ./lib/moonshot/stack.rb:207:in `create_stack'
     # ./lib/moonshot/stack.rb:30:in `block in create'
     # ./lib/moonshot/stack.rb:25:in `create'
     # ./spec/moonshot/stack_spec.rb:124:in `block (5 levels) in <top (required)>'