Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand tests to include more sample apps and version tests #45

Merged
merged 2 commits into from
Sep 28, 2016

Conversation

dazuma
Copy link
Member

@dazuma dazuma commented Sep 19, 2016

New tests include:

  • Sample app tests for Sinatra 1, Rails 4, and Rails 5 in addition to the existing Rack test.
  • Installation tests for all supported versions of Ruby installed from Google's package hosting, plus a test for a Ruby built from source.
  • Several more assertions for key properties of the base image

@dazuma
Copy link
Member Author

dazuma commented Sep 19, 2016

Details on the new tests:

  • Some new utilities used in tests. These are generally docker commands that ensure any images/containers created during the command are cleaned up. Relevant files:
  • appengine/test/test_helper.rb
  • Updates to base image test. We check various things such as successful installation of node, bundler, rbenv, and default ruby. We also check that a few key environment variables are set. Relevant files:
  • appengine/test/tc_base_image.rb
  • Ruby versions test. This loops through a list of ruby versions, creates an image for each, and runs ruby --version to make sure it installed successfully. Relevant files:
  • appengine/test/tc_ruby_versions.rb
  • appengine/test/ruby_versions/Dockerfile
  • Sample apps test update. Moved the apps into the sample_apps directory, and used the new utilities above to make the test code shorter. Relevant files:
  • appengine/test/tc_sample_apps.rb
  • The minimal_app sample app was moved into sample_apps and renamed rack_app. I updated it to use Rack 2.0, but it's otherwise unchanged.
  • Created a Sinatra app test. Relevant files:
  • appengine/test/sample_apps/sinatra1_app/Dockerfile
  • appengine/test/sample_apps/sinatra1_app/myapp.rb
  • Created a Rails 4 app test. Relevant files:
  • appengine/test/sample_apps/rails4_app/Dockerfile
  • appengine/test/sample_apps/rails4_app/app/controllers/home_controller.rb
  • Created a Rails 5 app test. Relevant files:
  • appengine/test/sample_apps/rails5_app/Dockerfile
  • appengine/test/sample_apps/rails5_app/app/controllers/home_controller.rb

@hxiong388 hxiong388 closed this Sep 28, 2016
@hxiong388 hxiong388 reopened this Sep 28, 2016
@dazuma dazuma merged commit 44f2ec0 into GoogleCloudPlatform:master Sep 28, 2016
@dazuma dazuma deleted the test-apps branch September 29, 2016 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants