mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-29 04:18:32 +00:00
49c5eba4589675967f90575f683bf8f2b1b46d68
T.TempDir to create temporary test directory (#2671)
This commit replaces `os.MkdirTemp` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.
Prior to this commit, temporary directory created using `os.MkdirTemp`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
defer func() {
if err := os.RemoveAll(dir); err != nil {
t.Fatal(err)
}
}
is also tedious, but `t.TempDir` handles this for us nicely.
Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Atlantis

Terraform Pull Request Automation
Resources
- How to get started: www.runatlantis.io/guide
- Full documentation: www.runatlantis.io/docs
- Download the latest release: github.com/runatlantis/atlantis/releases/latest
- Get help in our Slack channel
- Start Contributing: CONTRIBUTING.md
What is Atlantis?
A self-hosted golang application that listens for Terraform pull request events via webhooks.
What does it do?
Runs terraform plan and apply remotely and comments back on the pull request with the output.
Why should you use it?
- Make Terraform changes visible to your whole team.
- Enable non-operations engineers to collaborate on Terraform.
- Standardize your Terraform workflows.