Fixed rspec tests for role and host creation
This commit is contained in:
Родитель
7d1af48829
Коммит
2973e47422
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml version="1.0"?>
|
||||
<Deployment xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Name>unknown_yet</Name>
|
||||
<DeploymentSlot>Production</DeploymentSlot>
|
||||
|
@ -36,4 +36,4 @@
|
|||
<RoleSize>ExtraSmall</RoleSize>
|
||||
</Role>
|
||||
</RoleList>
|
||||
</Deployment>
|
||||
</Deployment>
|
|
@ -1,4 +1,3 @@
|
|||
<?xml version="1.0"?>
|
||||
<PersistentVMRole xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<RoleName>vm01</RoleName>
|
||||
<OsVersion i:nil="true"/>
|
||||
|
@ -53,4 +52,4 @@
|
|||
<SourceImageName>SUSE__OpenSUSE64121-03192012-en-us-15GB</SourceImageName>
|
||||
</OSVirtualHardDisk>
|
||||
<RoleSize>ExtraSmall</RoleSize>
|
||||
</PersistentVMRole>
|
||||
</PersistentVMRole>
|
|
@ -87,6 +87,7 @@ describe "for bootstrap protocol winrm:" do
|
|||
@server_params[:admin_password].should == 'winrm_password'
|
||||
@server_params[:bootstrap_proto].should == 'winrm'
|
||||
@server_params[:azure_dns_name].should == 'service001'
|
||||
@server_params[:port].should == '5985'
|
||||
end
|
||||
|
||||
context "bootstrap node" do
|
||||
|
@ -146,6 +147,7 @@ describe "for bootstrap protocol ssh:" do
|
|||
@server_params[:ssh_user].should == 'ssh_user'
|
||||
@server_params[:bootstrap_proto].should == 'ssh'
|
||||
@server_params[:azure_dns_name].should == 'service001'
|
||||
@server_params[:port].should == '22'
|
||||
end
|
||||
|
||||
it "successful bootstrap" do
|
||||
|
|
|
@ -29,14 +29,14 @@ describe "hosts" do
|
|||
|
||||
context 'create a new host' do
|
||||
it 'using explicit parameters it should pass in expected body' do
|
||||
params = {:hosted_service_name=>'service003', 'hosted_service_description'=>'Explicitly created hosted service', 'hosted_service_location'=>'Windows Azure Preview'}
|
||||
params = {:azure_dns_name=>'service003', 'hosted_service_location'=>'Windows Azure Preview'}
|
||||
host = @connection.hosts.create(params)
|
||||
@postname.should == 'hostedservices'
|
||||
@postverb.should == 'post'
|
||||
Nokogiri::XML(@postbody).should be_equivalent_to(Nokogiri::XML readFile('create_host.xml'))
|
||||
end
|
||||
it 'using default parameters it should pass in expected body' do
|
||||
params = {:hosted_service_name=>'service003'}
|
||||
params = {:azure_dns_name=>'service003'}
|
||||
host = @connection.hosts.create(params)
|
||||
@postname.should == 'hostedservices'
|
||||
@postverb.should == 'post'
|
||||
|
|
|
@ -43,7 +43,8 @@ describe "roles" do
|
|||
:udp_endpoints=>'65:65,75',
|
||||
:storage_account=>'storageaccount001',
|
||||
:bootstrap_proto=>'ssh',
|
||||
:os_type=>'Linux'
|
||||
:os_type=>'Linux',
|
||||
:port=>'22'
|
||||
|
||||
}
|
||||
deploy = @connection.deploys.create(params)
|
||||
|
@ -70,7 +71,8 @@ describe "roles" do
|
|||
:vm_size=>'ExtraSmall',
|
||||
:storage_account=>'storageaccount001',
|
||||
:bootstrap_proto=>'ssh',
|
||||
:os_type=>'Linux'
|
||||
:os_type=>'Linux',
|
||||
:port=>'22'
|
||||
}
|
||||
deploy = @connection.deploys.create(params)
|
||||
#this is a cheesy workaround to make equivalent-xml happy
|
||||
|
|
Загрузка…
Ссылка в новой задаче