Sha256: 0a859451d317e009c3fc06dc7ac5445d707c86445b6a6d0b594166311006ed3b
Contents?: true
Size: 1.71 KB
Versions: 7
Compression:
Stored size: 1.71 KB
Contents
require 'spec_helper' class EY::Serverside::Source::Archive def fetch_command "cp #{uri} #{source_cache}" end end describe "Deploying a simple application" do let(:adapter) { EY::Serverside::Adapter.new do |args| args.account_name = "account" args.app = "application_name" args.stack = "nginx_unicorn" args.environment_name = "environment_name" args.framework_env = "production" args.archive = FIXTURES_DIR.join('retwisj.war') args.verbose = true args.instances = [{ :hostname => "localhost", :roles => ["solo"], :name => "single" }] args.serverside_version = Gem::Version.create(EY::Serverside::VERSION.dup).release args.config = { "deploy_to" => deploy_dir, "release_path" => release_path.to_s, "group" => GROUP } end } let(:binpath) { File.expand_path(File.join(File.dirname(__FILE__), '..', 'bin', 'engineyard-serverside')) } before(:all) do argv = adapter.deploy.commands.last.to_argv[2..-1] with_mocked_commands do capture do EY::Serverside::CLI.start(argv) end end end it "exploded the war" do %w(META-INF WEB-INF).each {|dir| File.exists?(deploy_dir.join('current', dir)) } end it "creates a REVISION file" do path = deploy_dir.join('current', 'REVISION') expect(path).to exist checksum = File.read(path).strip expect(checksum).to match(/7400dc058376745c11a98f768b799c6651428857\s+.*retwisj.war$/) end it "restarts the app servers" do restart = deploy_dir.join('current', 'restart') restart.should exist expect(restart.read.chomp).to eq(%|LANG="en_US.UTF-8" /engineyard/bin/app_application_name deploy|) end end
Version data entries
7 entries across 7 versions & 1 rubygems