1#/bin/sh
2#
3# End-to-end test using the private server
4#
5
6#
7# Extract the login information from the encrypted file
8#
9
10# $serverlogin will include the --user --pass and --url options for the
11# private ofx server
12export serverlogin="`gpg -d login-privateserver.asc` --org=ReferenceFI --fid=00000 --bank=000000000 --broker=brokerdomain.com"
13
14#
15# Test a payment
16#
17
18#./ofxconnect -p $serverlogin --acct=10001010 --type=1 tmpfilex && cat tmpfilex
19
20#
21# Test a payment status inquiry
22#
23
24#./ofxconnect -i $serverlogin --trid=21384 tmpfilex && cat tmpfilex
25
26#exit
27
28#
29# Test the list of accounts
30#
31
32#./ofxconnect -a $serverlogin tmpfilex && ../ofxdump/ofxdump tmpfilex
33
34
35#
36# Test checking accounts
37#
38
39./ofxconnect -s $serverlogin --acct=10001010 --type=1 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex || exit 77
40exit
41./ofxconnect -s $serverlogin --acct=10001001 --type=1 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex
42./ofxconnect -s $serverlogin --acct=10001002 --type=1 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex
43./ofxconnect -s $serverlogin --acct=10003001 --type=1 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex
44
45#
46# Test investment accounts
47#
48
49./ofxconnect -s $serverlogin --acct=20001001 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex
50./ofxconnect -s $serverlogin --acct=10001010 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex
51./ofxconnect -s $serverlogin --acct=10001001 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex
52./ofxconnect -s $serverlogin --acct=10001401 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex
53./ofxconnect -s $serverlogin --acct=10001000 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex
54./ofxconnect -s $serverlogin --acct=20001001 --type=2 --past=90 tmpfilex && ../ofxdump/ofxdump tmpfilex
55
56#
57# These don't work yet because I mistakenly put "CHECKING" in for all "BANK" statments as the account type :-(
58#
59
60# --acct=10001003 --type=1 --past=90
61# --acct=10001004 --type=1 --past=90
62# --acct=10001005 --type=1 --past=90
63
64#
65# This one throws an ofx.ValidationException.  However, the other investment accounts work fine!!
66#
67
68# --acct=10002000 --type=2 --past=90
69