diff --git a/spec/hatchet/app_spec.rb b/spec/hatchet/app_spec.rb index 819e053..6684abe 100644 --- a/spec/hatchet/app_spec.rb +++ b/spec/hatchet/app_spec.rb @@ -29,19 +29,6 @@ expect(app.platform_api.app.info(app.name)["build_stack"]["name"]).to eq(stack) end - it "create app with HATCHET_DEFAULT_STACK set" do - begin - original_default_stack = ENV["HATCHET_DEFAULT_STACK"] - default_stack = "heroku-18" - ENV["HATCHET_DEFAULT_STACK"] = default_stack - app = Hatchet::App.new("default_ruby") - app.create_app - expect(app.platform_api.app.info(app.name)["build_stack"]["name"]).to eq(default_stack) - ensure - ENV["HATCHET_DEFAULT_STACK"] = original_default_stack - end - end - describe "before deploy" do it "dir" do @called = false diff --git a/spec/hatchet/ci_spec.rb b/spec/hatchet/ci_spec.rb index 5a9ad0f..fadcc6d 100644 --- a/spec/hatchet/ci_spec.rb +++ b/spec/hatchet/ci_spec.rb @@ -1,7 +1,7 @@ require "spec_helper" -describe "CIFourTest" do - it "error with bad app" do +describe "CI" do + it "runs rakefile contents" do string = SecureRandom.hex app = Hatchet::GitApp.new("default_ruby") @@ -17,47 +17,4 @@ expect(test_run.output).to_not match("Installing rake") end end - - it "error with bad app" do - pending("upgrade rails 5 app to newer") - - expect { - Hatchet::GitApp.new("rails5_ci_fails_no_database", stack: "heroku-18").run_ci { } - }.to raise_error(/PG::ConnectionBad: could not connect to server/) - end - - it "error with bad app" do - @before_deploy_called = false - @before_deploy_dir_pwd = nil - - before_deploy = -> do - @before_deploy_called = true - @before_deploy_dir_pwd = Dir.pwd - end - - Hatchet::GitApp.new("rails5_ci_fails_no_database", stack: "heroku-18", allow_failure: true, before_deploy: before_deploy).run_ci do |test_run| - expect(test_run.status).to eq(:errored) - expect(@before_deploy_dir_pwd).to eq(Dir.pwd) - expect(@before_deploy_called).to be_truthy - end - - expect(@before_deploy_dir_pwd).to_not eq(Dir.pwd) - end - - it "ci create app with stack" do - pending("upgrade rails 5 app to newer") - - app = Hatchet::GitApp.new("rails5_ruby_schema_format") - app.run_ci do |test_run| - expect(test_run.output).to match("Ruby buildpack tests completed successfully") - expect(test_run.status).to eq(:succeeded) - expect(app.pipeline_id).to_not be_nil - - api_rate_limit = app.api_rate_limit.call - couplings = api_rate_limit.pipeline_coupling.list_by_pipeline(app.pipeline_id) - coupled_app = api_rate_limit.app.info(couplings.first["app"]["id"]) - expect(coupled_app["name"]).to eq(app.name) - end - expect(app.pipeline_id).to be_nil - end end