Skip to content

Commit

Permalink
/integration-tests/bats/ci.bats: add test for remove workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
coffeegoddd committed Nov 18, 2024
1 parent c9b67c9 commit 8b31a25
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions integration-tests/bats/ci.bats
Original file line number Diff line number Diff line change
Expand Up @@ -332,3 +332,45 @@ EOF
[[ ${output} == *"jobs:"* ]] || false
[[ ${output} == *"steps:"* ]] || false
}

@test "ci: remove deletes a workflow" {
skip_remote_engine
cat > workflow_1.yaml <<EOF
name: workflow_1
on:
push:
branches:
- master
jobs:
- name: validate tables
steps:
- name: assert expected tables exist
saved_query_name: show tables
expected_rows: "== 2"
EOF
cat > workflow_2.yaml <<EOF
name: workflow_2
on:
push:
branches:
- master
jobs:
- name: validate tables
steps:
- name: assert expected tables exist
saved_query_name: show tables
expected_rows: "== 2"
EOF
dolt ci init
dolt ci import ./workflow_1.yaml
dolt ci import ./workflow_2.yaml
run dolt ci ls
[ "$status" -eq 0 ]
[[ "$output" =~ "workflow_1" ]] || false
[[ "$output" =~ "workflow_2" ]] || false
run dolt ci remove "workflow_1"
[ "$status" -eq 0 ]
run dolt ci ls
[ "$status" -eq 0 ]
[[ "$output" =~ "workflow_2" ]] || false
}

0 comments on commit 8b31a25

Please sign in to comment.