Skip to content

Commit 49e76ac

Browse files
committed
EML-000: add support for gitops branch
1 parent dbfecdc commit 49e76ac

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/update-gitops.bats

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,19 @@ teardown() {
114114
! grep -q 'git commit' "${TEST_TEMP_DIR}/git_calls.log" 2>/dev/null || true
115115
}
116116

117+
# --- Simulate on gitops branch ---
118+
119+
@test "updates DEV update on DEV devops branch" {
120+
export GITHUB_REF="refs/heads/dev"
121+
export INPUT_GITOPS_REPOSITORY_BRANCH="dev"
122+
export INPUT_GITOPS_DEV="kubernetes/namespaces/svc/dev/de1/deploy.yaml spec.image"
123+
run "$SCRIPT"
124+
125+
assert_success
126+
assert_output --partial "Run update for DEV"
127+
grep -q "${INPUT_GITOPS_REPOSITORY_BRANCH}" "${TEST_TEMP_DIR}/git_calls.log" 2>/dev/null || true
128+
}
129+
117130
# --- No files configured ---
118131

119132
@test "does nothing when no gitops files are configured" {

0 commit comments

Comments
 (0)