Skip to content

Commit

Permalink
Switch to occ for app password
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Brahmer <[email protected]>
  • Loading branch information
Grotax committed Oct 24, 2022
1 parent 6a27143 commit b121e9c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions tests/api/feeds.bats
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ setup_file(){
load "helpers/settings-override"
fi

export APP_PASSWORD=$(http --ignore-stdin -b -a ${user}:${user} GET ${NC_HOST}/ocs/v2.php/core/getapppassword OCS-APIRequest:true | grep -Po '<apppassword>\K([A-Z|0-9|a-z]+)[^<\/apppassword>]')
sleep 2
export APP_PASSWORD=$(NC_PASS=${user} ./occ user:add-app-password ${user} --password-from-env | grep -Po '([A-Z|a-z|0-9]{72})')
}

teardown_file(){
Expand Down Expand Up @@ -38,7 +37,7 @@ teardown() {

@test "[$TESTSUITE] Read empty" {
run http --ignore-stdin -b -a ${user}:${APP_PASSWORD} GET ${BASE_URLv1}/feeds

assert_output --partial "\"feeds\":[]"
assert_output --partial "\"starredCount\":0"
}
Expand Down
3 changes: 1 addition & 2 deletions tests/api/folders.bats
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ setup_file(){
load "helpers/settings-override"
fi

export APP_PASSWORD=$(http --ignore-stdin -b -a ${user}:${user} GET ${NC_HOST}/ocs/v2.php/core/getapppassword OCS-APIRequest:true | grep -Po '<apppassword>\K([A-Z|0-9|a-z]+)[^<\/apppassword>]')
sleep 2
export APP_PASSWORD=$(NC_PASS=${user} ./occ user:add-app-password ${user} --password-from-env | grep -Po '([A-Z|a-z|0-9]{72})')
}

teardown_file(){
Expand Down
3 changes: 1 addition & 2 deletions tests/api/items.bats
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ setup_file(){
load "helpers/settings-override"
fi

export APP_PASSWORD=$(http --ignore-stdin -b -a ${user}:${user} GET ${NC_HOST}/ocs/v2.php/core/getapppassword OCS-APIRequest:true | grep -Po '<apppassword>\K([A-Z|0-9|a-z]+)[^<\/apppassword>]')
sleep 2
export APP_PASSWORD=$(NC_PASS=${user} ./occ user:add-app-password ${user} --password-from-env | grep -Po '([A-Z|a-z|0-9]{72})')
}

teardown_file(){
Expand Down

0 comments on commit b121e9c

Please sign in to comment.