mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-05 00:50:17 -06:00
add bats test for dolt profile global config file 0600 lock
This commit is contained in:
@@ -183,6 +183,14 @@ teardown() {
|
||||
[[ "$output" =~ "Only one profile name can be specified" ]] || false
|
||||
}
|
||||
|
||||
@test "profile: dolt profile add locks global config with 0600" {
|
||||
run dolt profile add --use-db altDB altTest
|
||||
[ "$status" -eq 0 ] || false
|
||||
|
||||
run stat "$BATS_TMPDIR/config-$$/.dolt/config_global.json"
|
||||
[[ "$output" =~ "-rw-------" ]] || false
|
||||
}
|
||||
|
||||
@test "profile: dolt profile remove removes a profile" {
|
||||
dolt profile add --use-db altDB altTest
|
||||
run dolt profile
|
||||
@@ -242,6 +250,15 @@ teardown() {
|
||||
[[ "$output" =~ "Only one profile name can be specified" ]] || false
|
||||
}
|
||||
|
||||
@test "profile: dolt profile remove locks global config with 0600" {
|
||||
dolt profile add --use-db altDB altTest
|
||||
run dolt profile remove altTest
|
||||
[ "$status" -eq 0 ] || false
|
||||
|
||||
run stat "$BATS_TMPDIR/config-$$/.dolt/config_global.json"
|
||||
[[ "$output" =~ "-rw-------" ]] || false
|
||||
}
|
||||
|
||||
@test "profile: dolt profile lists all profiles" {
|
||||
dolt profile add --use-db altDB altTest
|
||||
dolt profile add --use-db defaultDB -u "steph" --password "pass" defaultTest
|
||||
|
||||
Reference in New Issue
Block a user