diff --git a/tests/files/bad_syntax.plan b/tests/files/bad_syntax.sh similarity index 100% rename from tests/files/bad_syntax.plan rename to tests/files/bad_syntax.sh diff --git a/tests/files/basic.plan b/tests/files/basic.sh similarity index 100% rename from tests/files/basic.plan rename to tests/files/basic.sh diff --git a/tests/files/empty_script.plan b/tests/files/empty_script.sh similarity index 100% rename from tests/files/empty_script.plan rename to tests/files/empty_script.sh diff --git a/tests/files/empty_sources.plan b/tests/files/empty_sources.sh similarity index 100% rename from tests/files/empty_sources.plan rename to tests/files/empty_sources.sh diff --git a/tests/files/empty_targets.plan b/tests/files/empty_targets.sh similarity index 100% rename from tests/files/empty_targets.plan rename to tests/files/empty_targets.sh diff --git a/tests/files/multiple_file_targets.plan b/tests/files/multiple_file_targets.sh similarity index 100% rename from tests/files/multiple_file_targets.plan rename to tests/files/multiple_file_targets.sh diff --git a/tests/files/no_file_target.plan b/tests/files/no_file_target.sh similarity index 100% rename from tests/files/no_file_target.plan rename to tests/files/no_file_target.sh diff --git a/tests/files/unsupported_source_scheme.plan b/tests/files/unsupported_source_scheme.sh similarity index 100% rename from tests/files/unsupported_source_scheme.plan rename to tests/files/unsupported_source_scheme.sh diff --git a/tests/files/unsupported_target_scheme.plan b/tests/files/unsupported_target_scheme.sh similarity index 100% rename from tests/files/unsupported_target_scheme.plan rename to tests/files/unsupported_target_scheme.sh diff --git a/tests/parse_uri.bats b/tests/parse_uri.bats index e50c016..ef5579c 100644 --- a/tests/parse_uri.bats +++ b/tests/parse_uri.bats @@ -119,13 +119,13 @@ setup() { [ "$fragment" == '' ] } -@test "sqlite:///path" { +@test "sqlite:///database.db" { . uri.sh - parse_uri 'sqlite:///path' + parse_uri 'sqlite:///database.db' [ "$scheme" == 'sqlite' ] [ "$hostname" == '' ] [ "$port" == '' ] - [ "$path" == '/path' ] + [ "$path" == '/database.db' ] [ "$username" == '' ] [ "$password" == '' ] [ "$query" == '' ] diff --git a/tests/source_script.bats b/tests/source_script.bats index 100897d..475077d 100644 --- a/tests/source_script.bats +++ b/tests/source_script.bats @@ -17,50 +17,50 @@ setup() { @test "Bad script syntax" { . source.sh - run source_script $DIR/files/bad_syntax.plan + run source_script $DIR/files/bad_syntax.sh assert_output --partial 'Error: Please check your syntax' } @test "Empty script" { . source.sh - run source_script $DIR/files/empty_script.plan + run source_script $DIR/files/empty_script.sh assert_output --partial 'Error: sources array is not set' } @test "Empty sources array" { . source.sh - run source_script $DIR/files/empty_sources.plan + run source_script $DIR/files/empty_sources.sh assert_output --partial 'Error: sources array is not set' } @test "Empty targets array" { . source.sh - run source_script $DIR/files/empty_targets.plan + run source_script $DIR/files/empty_targets.sh assert_output --partial 'Error: targets array is not set' } @test "No targets with 'file' URI scheme" { . source.sh - run source_script $DIR/files/no_file_target.plan + run source_script $DIR/files/no_file_target.sh assert_output --partial "Error: 'file' scheme is not set in targets. You must provide one or more targets with 'file' scheme." } @test "Unsuported source scheme" { . source.sh - run source_script $DIR/files/unsupported_source_scheme.plan + run source_script $DIR/files/unsupported_source_scheme.sh assert_output --partial 'Error: Unsupported URI scheme: mongo' } @test "Unsuported target scheme" { . source.sh - run source_script $DIR/files/unsupported_target_scheme.plan + run source_script $DIR/files/unsupported_target_scheme.sh assert_output --partial 'Error: Unsupported URI scheme: scp' } @test "Set __main_target" { . source.sh . uri.sh # for parse_uri() - source_script $DIR/files/basic.plan + source_script $DIR/files/basic.sh [ "$__main_target" == 'file:/etc/lvm/backup' ] [ "$__main_target_path" == '/etc/lvm/backup' ] } @@ -68,7 +68,7 @@ setup() { @test "Set __main_target from multiple 'file' targets" { . source.sh . uri.sh # for parse_uri() - source_script $DIR/files/multiple_file_targets.plan + source_script $DIR/files/multiple_file_targets.sh [ "$__main_target" == 'file:///etc/lvm/backup' ] [ "$__main_target_path" == '/etc/lvm/backup' ] }