Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
IaCにおけるテスト考察 / Tests in IaC
Search
linyows
June 24, 2024
Programming
1.1k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
IaCにおけるテスト考察 / Tests in IaC
@2024-06-24 さくらインターネット IaC 社内勉強会 LT
linyows
June 24, 2024
More Decks by linyows
See All by linyows
GoとClickhouseで作るRAGアプリ / Building RAG Application with Go and Clickhouse
linyows
1
320
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
970
Protocol Buffersの型を超えて拡張性を得る / Beyond Protocol Buffers Types Achieving Extensibility
linyows
0
330
研究開発と実装OSSと プロダクトの好循環 / A virtuous cycle of research and development implementation OSS and products
linyows
1
1k
コードジェネレーターで 効率的な開発をする / Efficient development with code generators
linyows
0
530
研究を支える拡張性の高い ワークフローツールの提案 / Proposal of highly expandable workflow tools to support research
linyows
0
770
非コンテナ環境において宣言的Deploymentを手軽に実現する / Declarative deployment in non-container environments
linyows
1
680
メール送信サーバの集約における透過型SMTP プロキシの定量評価 / Quantitative Evaluation of Transparent SMTP Proxy in Email Sending Server Aggregation
linyows
0
1.3k
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
760
Other Decks in Programming
See All in Programming
Rails初心者がパスキーを実装してみて大変だったこと
ktombow
0
160
Crash Auto Pipelines
veronikapj
1
400
Performance Optimization With LLMs
xleitix
0
250
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.8k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
420
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
320
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
540
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
3
1.5k
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
16
8.9k
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
330
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
230
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
3.7k
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
380
The SEO identity crisis: Don't let AI make you average
varn
0
630
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
620
From π to Pie charts
rasagy
1
440
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
580
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
121
130k
Building Adaptive Systems
keathley
44
3.3k
Transcript
@2024-06-24 さくらインターネット IaC 社内勉強会 LT IaCにおけるテスト考察
小 田 知央 / Tomohisa Oda @linyows • 福岡市在住 •
Fukuoka.go 主催 • 趣味は筋トレとテニス • OSS: Octopass, Dewy, Rotion, Warp… • https://tomohisaoda.com • https://x.com/linyows
インフラ変更のテストはどうしていますか? •テストはない、そもそも不要 !? •もちろん 人力 によるテスト •テストはあるがテストの実 行 時間が 長
い
IaCのためのツールはほぼ宣 言 的なコード • IaCのツール、Terraform, Ansible, Chef, Puppet は宣 言
的なインフラリソー スを定義する • 宣 言 的コードの実 行 保証はツール側であり、使う側があえてする必要はない • 利便性のために命令的なモジュールは存在するが宣 言 的になるようモジュール を作るのが好ましい • モジュール開発ではしっかりテストが必要
5 Ansible incorporates declarative and imperative means. This mix offers
you the fl exibility to focus on what you need to do, rather than strictly adhere to one paradigm. l l
それでもテストを書きたい • テスト時間を短くするにはテストサイズの 小 さいUnitテストを書くことにな る • Terraform: terraform test
• Ansible: molecule • Chef: chefspec, test-kitchen
IaCのUnitテストはコストと 見 合っているか • 経験としてはUnitテストを書く時間と得ら れる安全は 見 合っていない感覚がある • IaC
本では、Application Codeのテストピ ラミッドとは異なり Declaration Codeの テストは ダイヤモンドモデルになるだろう と書いてある
Online Stack testを書くには? • Online Stack testは、例えば、ネットワーク、コンピュート、データベー ス、ストレージが連携して期待する動作を確認する • そんなツールありますか?
• 例えば、特定のapache moduleが有効になっていること(設定でなく実際使 える)、メールがを送信するとDKIMヘッダーがついていること • テストするには複雑なことが多い
ユーザーがコマンドを作るのはどうだろうか • テストフレームワークはassetionの成功失敗だけを管理するだけ テストフレームワーク ユーザが書くテストコマンド ユーザが書くテストコマンド ユーザが書くテストコマンド 🤔
ユーザーがコマンドを作るのはどうだろうか • テストフレームワークはassetionの成功失敗だけを管理するだけ テストフレームワーク ユーザが書くテストコマンド ユーザが書くテストコマンド ユーザが書くテストコマンド テストのテストが必 要になるのでダメな ことに気づいた
runnで良いのかもし れない 🙅