- google groupsの投稿によると「New integration tests for CF」用のツール
- BOSHのテストのBATのようにCATと略すらしい
- go実装のcfコマンドgcfとcurlを使う
- goのBDD風なテストのフレームワークの「Ginkgo」利用している
参考URL: https://groups.google.com/a/cloudfoundry.org/forum/#!topic/vcap-dev/2daJJklWTOY
このgistは Cloud Foundry Advent Calendar 2013 の16日目の記事です。
現在、CloudFoundryのComponentsはGo化しつつあります。それにより、Rubyで実装されていたものに対して性能向上していたり、ソースが読みやすくなっていたりする(こちらは主観ですが・・)半面、開発者にとっての課題も生まれています。その課題のひとつが__依存パッケージ管理__です。まずはRubyの外部パッケージ管理について簡単に振り返りつつ、Goのそれを見ていこうと思います。
Rubyでは外部パッケージはGemファイルとなっており、大抵の場合、Bundlerで管理します。また、最新版が動くとは限らないため設定ファイルにバージョンを指定してそれを使用します。Gemファイル自体はRubyGems.orgに置かれており、ここからダウンロードされます。
Goではソースコード中のimport句でパッケージを指定します。設定ファイルは使いません。以下に例を示します。
本記事に入る前の イントロ 部分
※実際のgostenoの内容部分が割と薄いのと、とある人から遊び心が大事なことを思い出させて頂いたので
別の方向に時間をかけてしまいました。
今日の内容は以下からになります!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source :rubygems | |
| gem 'cfoundry' | |
| gem 'uuidtools' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source :rubygems | |
| gem 'cfoundry' | |
| gem 'uuidtools' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server 'localhost', :test | |
| server '127.0.0.1', :test2 | |
| task :test_serially do | |
| serially do | |
| run 'date && sleep 5' | |
| end | |
| end | |
| def serially(&block) |
