Skip to content

Commit

Permalink
/integration-tests/bats/ci.bats: finish up for now
Browse files Browse the repository at this point in the history
  • Loading branch information
coffeegoddd committed Nov 18, 2024
1 parent db76ea0 commit c9b67c9
Showing 1 changed file with 45 additions and 2 deletions.
47 changes: 45 additions & 2 deletions integration-tests/bats/ci.bats
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,53 @@ EOF
[[ "$output" =~ "Dolt CI Workflow 'my first DoltHub workflow' up to date." ]] || false
}

@test "ci: export exports a workflow to a yaml file" {
@test "ci: ls lists existing workflows" {
skip_remote_engine
cat > workflow.yaml <<EOF
name: my_workflow
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.yaml
run dolt ci ls
[ "$status" -eq 0 ]
[[ "$output" =~ "my_workflow" ]] || false
}

@test "ci: ls lists existing workflows" {
@test "ci: export exports a workflow to a yaml file" {
skip_remote_engine
cat > workflow.yaml <<EOF
name: my_workflow
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.yaml
run dolt ci export "my_workflow"
[ "$status" -eq 0 ]
cat my_workflow.yaml
run cat my_workflow.yaml
[ "$status" -eq 0 ]
[[ ${output} == *"name"* ]] || false
[[ ${output} == *"push:"* ]] || false
[[ ${output} == *"branches:"* ]] || false
[[ ${output} == *"jobs:"* ]] || false
[[ ${output} == *"steps:"* ]] || false
}

0 comments on commit c9b67c9

Please sign in to comment.