You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `aws-component-helper` test suite is designed to be used with the `atmos` tool to allow you to test components
190
+
that follow the Cloud Posse standards for implementation. The test suite runs several test "phases", which can be
191
+
individually skipped as needed. By default, all phases are run. The following phases are run by default:
192
+
193
+
| Phase | Description |Flag|
194
+
| ----- | ----------- |----|
195
+
| Setup Test Suite | Bootstraps a temp directory and creates a new test suite or reads in a test suite from `test-suite.json` | N/A |
196
+
| Setup Component Under Test | Copies the component from `src/` to the temp dir `components/terraform` | `-skip-setup-cut` |
197
+
| Vendor Dependencies | Runs the `atmos vendor pull` command to pull in dependency components | `-skip-vendor` |
198
+
| Deploy Dependencies | Runs the `atmos terraform apply` command to deploy the dependency stacks | `-skip-deploy-deps` |
199
+
| Verify Enabled Flag | Runs a test to ensure the `enabled` flag results in no resources being created | `-skip-verify-enabled-flag` |
200
+
| Deploy Component Under Test | Runs the `atmos terraform apply` command to deploy the component we are testing | `-skip-deploy-cut` |
201
+
| Destroy Component Under Test | Runs the `atmos terraform destroy` command to destroy the component we are testing | `-skip-destroy-cut` |
202
+
| Destroy Dependencies | Runs the `atmos destroy` command to destroy the dependencies | `-skip-destroy-deps` |
203
+
| Tear Down Test Suite | Cleans up the temp directory | `-skip-teardown` |
204
+
| Nuke Test Account | Uses [aws-nuke](https://github.com/ekristen/aws-nuke) to destroy all resources created during the test (by tag) | `-skip-aws-nuke` |
205
+
113
206
## Examples
114
207
115
208
The [example](examples/) folder contains a full set examples that demonstrate the use of `test-helpers`:
116
209
117
-
- [example](examples/awsnuke-example) folder contains a terraform module that can be used to test the `awsnuke` functionality.
210
+
- [example](examples/awsnuke-example) folder contains a terraform module that can be used to test the `awsnuke` functionality.
118
211
The test for this module is in [pkg/awsnuke/awsnuke_test.go](pkg/awsnuke/awsnuke_test.go).
212
+
- [test/aws-component-helper](test/aws-component-helper) folder contains a terraform module and test that can be used to demonstrate the `aws-component-helper` functionality.
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
119
225
120
226
## ✨ Contributing
121
227
122
228
This project is under active development, and we encourage contributions from our community.
@@ -130,19 +238,18 @@ Many thanks to our outstanding contributors:
130
238
For 🐛 bug reports & feature requests, please use the [issue tracker](https://github.com/cloudposse/test-helpers/issues).
131
239
132
240
In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
133
-
134
-
1. Review our [Code of Conduct](https://github.com/cloudposse/test-helpers/?tab=coc-ov-file#code-of-conduct) and [Contributor Guidelines](https://github.com/cloudposse/.github/blob/main/CONTRIBUTING.md).
135
-
2. **Fork** the repo on GitHub
136
-
3. **Clone** the project to your own machine
137
-
4. **Commit** changes to your own branch
138
-
5. **Push** your work back up to your fork
139
-
6. Submit a **Pull Request** so that we can review your changes
241
+
1. Review our [Code of Conduct](https://github.com/cloudposse/test-helpers/?tab=coc-ov-file#code-of-conduct) and [Contributor Guidelines](https://github.com/cloudposse/.github/blob/main/CONTRIBUTING.md).
242
+
2. **Fork** the repo on GitHub
243
+
3. **Clone** the project to your own machine
244
+
4. **Commit** changes to your own branch
245
+
5. **Push** your work back up to your fork
246
+
6. Submit a **Pull Request** so that we can review your changes
140
247
141
248
**NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request!
142
249
143
250
### 🌎 Slack Community
144
251
145
-
Join our [Open Source Community](https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/test-helpers&utm_content=slack) on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally _sweet_ infrastructure.
252
+
Join our [Open Source Community](https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/test-helpers&utm_content=slack) on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.
146
253
147
254
### 📰 Newsletter
148
255
@@ -153,7 +260,6 @@ Dropped straight into your Inbox every week — and usually a 5-minute read.
153
260
154
261
[Join us every Wednesday via Zoom](https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/test-helpers&utm_content=office_hours) for your weekly dose of insider DevOps trends, AWS news and Terraform insights, all sourced from our SweetOps community, plus a _live Q&A_ that you can’t find anywhere else.
0 commit comments