github.com/ericwq/aprilsh@v0.0.0-20240517091432-958bc568daa0/frontend/client/uit.sh (about) 1 APRILSH_APSHD_PATH=~/.local/bin/apshd 2 go test -cover . -args -test.gocoverdir=./coverage/unit 3 go tool covdata textfmt -i=./coverage/unit -o coverage/profile 4 go tool cover -html coverage/profile 5 6 go tool covdata percent -i=./coverage/unit,./coverage/int 7 go tool covdata textfmt -i=./coverage/unit,./coverage/int -o coverage/profile 8 go tool cover -func coverage/profile 9 go tool cover -html coverage/profile 10 11 # 1. login, change terminal size, log out. 12 # GOCOVERDIR=./coverage/int ~/.local/bin/apsh ide@localhost 13 # 2. login with plublic key 14 # GOCOVERDIR=./coverage/int ~/.local/bin/apsh -i ~/.ssh/id_ed25519 ide@localhost 15 # 1. input correct password: faild login 16 # 2. input incorrect password: login with ssh agent 17 # 3. login with remove ~/.ssh/know_hosts 18 # rm ~/.ssh/known_hosts* 19 # GOCOVERDIR=./coverage/int ~/.local/bin/apsh ide@localhost 20 # 1. reply no 21 # 2. reply enter 22 # 3. reply yes 23 # 4. login with wrong host name or wrong user name 24 # GOCOVERDIR=./coverage/int ~/.local/bin/apsh -verbose ide@localhost2 25 # GOCOVERDIR=./coverage/int ~/.local/bin/apsh -verbose ide2@localhost 26 # 5. close ssh agent, login with wrong plublic key, thus use password auth 27 # export SSH_AUTH_SOCK= 28 # GOCOVERDIR=./coverage/int ~/.local/bin/apsh -i ~/.ssh/id_777 ide@localhost 29 # 6. login then kill client process 30 # GOCOVERDIR=./coverage/int ~/.local/bin/apsh -verbose ide@localhost 31 # kill <pid>