From 2938bdc9927cfe0de1a15cf4c18ce71a0d9f91c0 Mon Sep 17 00:00:00 2001 From: milldr Date: Fri, 3 Jan 2025 17:41:01 -0500 Subject: [PATCH] Add test cases for atmos terraform deploy commands --- tests/test_cases.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/test_cases.yaml b/tests/test_cases.yaml index a21061a59..d0f0c8847 100644 --- a/tests/test_cases.yaml +++ b/tests/test_cases.yaml @@ -197,3 +197,37 @@ tests: stderr: - "^$" exit_code: 0 + + - name: atmos terraform deploy unlocked component + enabled: true + description: "Verify terraform deploy works on unlocked component in nonprod stack" + workdir: "../examples/demo-metadata" + command: "atmos" + args: + - "terraform" + - "deploy" + - "myapp" + - "-s" + - "nonprod" + expect: + stdout: + - "Executing Terraform command" + stderr: + - "^$" + exit_code: 0 + + - name: atmos terraform deploy locked component + enabled: true + description: "Verify terraform deploy fails on locked component in prod stack" + workdir: "../examples/demo-metadata" + command: "atmos" + args: + - "terraform" + - "deploy" + - "myapp" + - "-s" + - "prod" + expect: + stderr: + - "component 'myapp' is locked and cannot be modified \\(metadata.locked = true\\)" + exit_code: 1