脆弱性もバグ、だからテストしよう 継続的セキュリティテストサービスVAddy プレゼン資料Read less
脆弱性もバグ、だからテストしよう 継続的セキュリティテストサービスVAddy プレゼン資料Read less
インフラ部の荒井(@ryot_a_rai)です。この記事ではインフラの振る舞いテストのツールであるInfratasterを使ってリバースプロキシの設定のテストをしてみたいと思います。 Infratasterとは Infratasterはインフラの振る舞いをテストするフレームワークで、RSpecのテストヘルパとして機能します。例えば、 特定のヘッダ付きのHTTPリクエストを送信した時にあるレスポンスヘッダが返ってくることをテストする Capybaraを使って実際のWebブラウザ上での挙動をテストする MySQLのSHOW VARIABLESの結果をテストする といったことが可能になります。 細かい概要についてはこちらのスライドやREADMEをご覧ください。 Serverspecとの違い インフラのテストといえばServerspecが有名かと思いますが、InfratasterはServersp
[Infrataster] InfratasterでNginxのルーティングのテスト書いてるサーバーのテストはServerspecで書いているんだけど、Nginxの設定ファイルで書いているウェブサーバーのルーティングのテストをどうしようかと思っていました。自分で、簡単なツールでも書くべきかなあと。 /path/to/app でアプリケーションにプロクシーする 但しcookieがない場合は静的ファイルをサーブする /path/to/static/file で静的ファイルをNginxが直接サーブする /path/to/health/check でヘルスチェック用のレスポンスを返す、但しHTTPヘッダーを見て普通のブラウザーアクセスではForbiddenにする バーチャルドメインごとに微妙にパスとかが違う みたいなルーティングのテストは、外側からのテストなのでちょっとServerspecのスコー
この記事は最終更新から1年以上経過しています。 気をつけてね。 Chef,Puppetに代表される自動構築・構成管理ツールを使うと開発したサーバを検証用などの目的で簡単に再現可能になります。 ただ、漠然としたサーバ構築をしていると何をサービス提供しているのかという定義が曖昧になるため、Cucumber等を使ったテストを軸にテスト駆動でのサーバ構築をしてみましょう。 応用すれば既存のサーバをCucumberによってモデリングし、Chefによって繰り返し再現可能な状態に持っていけます。 このコンテンツで使ったコードはGithubの https://github.com/higanworks/test_driven_infrastructure_example で公開しています、参考にしてみたりフィードバックしてもらえると助かります。 ツール Cucumber: "ふるまい"を自然言語のように記
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く