Permalink
Browse files

Merge branch 'master' into nested

  • Loading branch information...
2 parents 0fa1f98 + 223976f commit 216940597ab905f6c8245d5b3d16a1643d51c09a Gary Liu committed Aug 14, 2013
View
@@ -0,0 +1 @@
+1.9.3-p448
View
@@ -3,16 +3,21 @@
set -e
set -x
+# Assumes the rootfs is already installed to /var/warden/rootfs
+# The warden test suite currently uses /tmp/warden/rootfs instead
+mkdir -p /tmp/warden
+ln -s /var/warden/rootfs /tmp/warden/rootfs
+
# Close stdin
exec 0>&-
# Remove remnants of apparmor (specific to Travis VM)
-sudo dpkg --purge apparmor
+# sudo dpkg --purge apparmor
# Install dependencies
-sudo apt-get -y install debootstrap quota
+# sudo apt-get -y install quota
cd warden
bundle install
-rvmsudo bundle exec rake setup[config/linux.yml]
+rvmsudo bundle exec rake setup:bin
rvmsudo bundle exec rake spec
View
@@ -0,0 +1,33 @@
+# Contributing to Warden
+
+The Cloud Foundry team uses GitHub and accepts contributions via
+[pull request](https://help.github.com/articles/using-pull-requests).
+
+## Contributor License Agreement
+
+Follow these steps to make a contribution to any of our open source repositories:
+
+1. Ensure that you have completed our CLA Agreement for
+ [individuals](http://www.cloudfoundry.org/individualcontribution.pdf) or
+ [corporations](http://www.cloudfoundry.org/corpcontribution.pdf).
+
+1. Set your name and email (these should match the information on your submitted CLA)
+
+ git config --global user.name "Firstname Lastname"
+ git config --global user.email "your_email@example.com"
+
+## General Workflow
+
+1. Fork the repository
+1. Create a feature branch (`git checkout -b better_warden`)
+1. Make changes on your branch
+1. [Run tests](https://github.com/cloudfoundry/warden#testing)
+1. Push to your fork (`git push origin better_warden`) and submit a pull request
+
+We favor pull requests with very small, single commits with a single purpose.
+
+Your pull request is much more likely to be accepted if:
+
+* Your pull request includes tests
+
+* Your pull request is small and focused with a clear message that conveys the intent of your change
View
@@ -1,4 +1,4 @@
-[![Build Status](https://travis-ci.org/cloudfoundry/warden.png)](https://travis-ci.org/cloudfoundry/warden)
+[![Code Climate](https://codeclimate.com/github/cloudfoundry/warden.png)](https://codeclimate.com/github/cloudfoundry/warden)
# warden
@@ -23,9 +23,29 @@ This repository contains the following components:
For information on how to run the warden server and interact with it
at the command line, see the [warden server README](warden/README.md).
+## Testing
+
+[warden-test-infrastructure](https://github.com/cloudfoundry/warden-test-infrastructure) provides a way to create a vagrant box and run warden tests.
+
+```
+# Checkout the repos
+git clone https://github.com/cloudfoundry/warden
+git clone https://github.com/cloudfoundry/warden-test-infrastructure
+
+# Create a vagrant box
+pushd warden-test-infrastructure && ./create_vagrant_box.sh && popd
+
+# Run warden tests
+pushd warden && ../warden-test-infrastructure/ci-build
+```
+
## License
The project is licensed under the Apache 2.0 license (see the
[`LICENSE`][license] file).
[license]: /LICENSE
+
+## Contributing
+
+Please read the [contributors' guide](https://github.com/cloudfoundry/warden/blob/master/CONTRIBUTING.md)
@@ -295,6 +295,7 @@ class LinkResponse
optional :exit_status, :uint32, 1
optional :stdout, :string, 2
optional :stderr, :string, 3
+ optional :info, InfoResponse, 4
end
@@ -433,6 +434,7 @@ class RunResponse
optional :exit_status, :uint32, 1
optional :stdout, :string, 2
optional :stderr, :string, 3
+ optional :info, InfoResponse, 4
end
@@ -488,6 +490,7 @@ class StreamResponse
optional :name, :string, 1
optional :data, :string, 2
optional :exit_status, :uint32, 3
+ optional :info, InfoResponse, 4
end
end
@@ -36,4 +36,5 @@ message LinkResponse {
optional uint32 exit_status = 1;
optional string stdout = 2;
optional string stderr = 3;
+ optional InfoResponse info = 4;
}
@@ -25,4 +25,5 @@ message RunResponse {
optional uint32 exit_status = 1;
optional string stdout = 2;
optional string stderr = 3;
+ optional InfoResponse info = 4;
}
@@ -37,4 +37,5 @@ message StreamResponse {
optional string name = 1;
optional string data = 2;
optional uint32 exit_status = 3;
+ optional InfoResponse info = 4;
}
@@ -2,56 +2,66 @@
require "spec_helper"
-describe Warden::Protocol::LinkRequest do
- subject(:request) do
- described_class.new(:handle => "handle", :job_id => 1)
- end
+module Warden::Protocol
+ describe LinkRequest do
+ subject(:request) do
+ described_class.new(:handle => "handle", :job_id => 1)
+ end
- it_should_behave_like "wrappable request"
+ it_should_behave_like "wrappable request"
- its("class.type_camelized") { should == "Link" }
- its("class.type_underscored") { should == "link" }
+ its("class.type_camelized") { should == "Link" }
+ its("class.type_underscored") { should == "link" }
- field :handle do
- it_should_be_required
- it_should_be_typed_as_string
- end
+ field :handle do
+ it_should_be_required
+ it_should_be_typed_as_string
+ end
- field :job_id do
- it_should_be_required
- it_should_be_typed_as_uint
- end
+ field :job_id do
+ it_should_be_required
+ it_should_be_typed_as_uint
+ end
- it "should respond to #create_response" do
- request.create_response.should be_a(Warden::Protocol::LinkResponse)
+ it "should respond to #create_response" do
+ request.create_response.should be_a(Warden::Protocol::LinkResponse)
+ end
end
-end
-describe Warden::Protocol::LinkResponse do
- subject(:response) do
- described_class.new
- end
+ describe Warden::Protocol::LinkResponse do
+ subject(:response) do
+ described_class.new
+ end
- it_should_behave_like "wrappable response"
+ it_should_behave_like "wrappable response"
- its("class.type_camelized") { should == "Link" }
- its("class.type_underscored") { should == "link" }
+ its("class.type_camelized") { should == "Link" }
+ its("class.type_underscored") { should == "link" }
- it { should be_ok }
- it { should_not be_error }
+ it { should be_ok }
+ it { should_not be_error }
- field :exit_status do
- it_should_be_optional
- it_should_be_typed_as_uint
- end
+ field :exit_status do
+ it_should_be_optional
+ it_should_be_typed_as_uint
+ end
- field :stdout do
- it_should_be_optional
- it_should_be_typed_as_string
- end
+ field :stdout do
+ it_should_be_optional
+ it_should_be_typed_as_string
+ end
+
+ field :stderr do
+ it_should_be_optional
+ it_should_be_typed_as_string
+ end
+
+ field :info do
+ it_should_be_optional
- field :stderr do
- it_should_be_optional
- it_should_be_typed_as_string
+ it "should be a InfoResponse" do
+ field.type.should == InfoResponse
+ end
+ end
end
-end
+end
@@ -2,68 +2,78 @@
require "spec_helper"
-describe Warden::Protocol::RunRequest do
- subject(:request) do
- described_class.new(:handle => "handle", :script => "echo foo")
- end
+module Warden::Protocol
+ describe RunRequest do
+ subject(:request) do
+ described_class.new(:handle => "handle", :script => "echo foo")
+ end
- it_should_behave_like "wrappable request"
+ it_should_behave_like "wrappable request"
- its("class.type_camelized") { should == "Run" }
- its("class.type_underscored") { should == "run" }
+ its("class.type_camelized") { should == "Run" }
+ its("class.type_underscored") { should == "run" }
- field :handle do
- it_should_be_required
- end
+ field :handle do
+ it_should_be_required
+ end
- field :script do
- it_should_be_required
- end
+ field :script do
+ it_should_be_required
+ end
- field :privileged do
- it_should_be_optional
- it_should_default_to false
- end
+ field :privileged do
+ it_should_be_optional
+ it_should_default_to false
+ end
- field :rlimits do
- it_should_be_optional
+ field :rlimits do
+ it_should_be_optional
- it "should be populated with ResourceLimits object" do
- request.rlimits = Warden::Protocol::ResourceLimits.new
- request.should be_valid
+ it "should be populated with ResourceLimits object" do
+ request.rlimits = ResourceLimits.new
+ request.should be_valid
+ end
end
- end
- it "should respond to #create_response" do
- request.create_response.should be_a(Warden::Protocol::RunResponse)
+ it "should respond to #create_response" do
+ request.create_response.should be_a(RunResponse)
+ end
end
-end
-describe Warden::Protocol::RunResponse do
- subject(:response) do
- described_class.new
- end
+ describe RunResponse do
+ subject(:response) do
+ described_class.new
+ end
- it_should_behave_like "wrappable response"
+ it_should_behave_like "wrappable response"
- its("class.type_camelized") { should == "Run" }
- its("class.type_underscored") { should == "run" }
+ its("class.type_camelized") { should == "Run" }
+ its("class.type_underscored") { should == "run" }
- it { should be_ok }
- it { should_not be_error }
+ it { should be_ok }
+ it { should_not be_error }
- field :exit_status do
- it_should_be_optional
- it_should_be_typed_as_uint
- end
+ field :exit_status do
+ it_should_be_optional
+ it_should_be_typed_as_uint
+ end
- field :stdout do
- it_should_be_optional
- it_should_be_typed_as_string
- end
+ field :stdout do
+ it_should_be_optional
+ it_should_be_typed_as_string
+ end
+
+ field :stderr do
+ it_should_be_optional
+ it_should_be_typed_as_string
+ end
- field :stderr do
- it_should_be_optional
- it_should_be_typed_as_string
+ field :info do
+ it_should_be_optional
+
+ it "should be a InfoResponse" do
+ field.type.should == InfoResponse
+ end
+ end
end
-end
+end
@@ -54,4 +54,12 @@
it_should_be_optional
it_should_be_typed_as_uint
end
+
+ field :info do
+ it_should_be_optional
+
+ it "should be a InfoResponse" do
+ field.type.should == Warden::Protocol::InfoResponse
+ end
+ end
end
View
@@ -22,7 +22,7 @@ GIT
GIT
remote: https://github.com/cloudfoundry/warden.git
- revision: 7fea1225f44808a6b06e7bc48918e42dd5c41c23
+ revision: 6d46e3ab019cd8f2eb294c1078550e78482477eb
specs:
warden-client (0.1.0)
warden-protocol (~> 0.1.0)
Oops, something went wrong.

0 comments on commit 2169405

Please sign in to comment.