File: 10_paths.sh

package info (click to toggle)
pass-update 2.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 240 kB
  • sloc: sh: 658; makefile: 70; python: 52
file content (44 lines) | stat: -rwxr-xr-x 1,228 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
# shellcheck disable=SC2016,SC1091,SC2164

export test_description="Testing pass update."
cd tests
source ./commons


test_cleanup
test_export "paths"
test_pass_populate


test_expect_success 'Testing not updating one password' '
    _pass update Business/site.com &&
    test_password_is Business/site.com $PASSWORD
    '

test_expect_success 'Testing updating multiple passwords' '
    _pass update --force France/bank France/freebox France/mobilephone &&
    test_password_is_not France/bank $PASSWORD &&
    test_password_is_not France/freebox $PASSWORD &&
    test_password_is_not France/mobilephone $PASSWORD
    '

test_expect_success 'Testing updating folder' '
    _pass update --force Email/ &&
    test_password_is_not Email/donenfeld.com $PASSWORD &&
    test_password_is_not Email/zx2c4.com $PASSWORD
    '

test_expect_success "Testing bulk update" "
    _pass update --force 'Business/*/login' &&
    test_password_is_not Business/bitcoin/login $PASSWORD &&
    test_password_is_not 'Business/a space/login' $PASSWORD &&
    test_password_is_not Business/euro/login $PASSWORD
    "

test_expect_success "Testing updating everything" "
    _pass update --force / &> /dev/null
    "


test_done