Skip to content

Instantly share code, notes, and snippets.

@jdiverp
Last active August 12, 2020 18:58
Show Gist options
  • Select an option

  • Save jdiverp/9d27e77aba4c9d0e2b5a11ddbe0f3748 to your computer and use it in GitHub Desktop.

Select an option

Save jdiverp/9d27e77aba4c9d0e2b5a11ddbe0f3748 to your computer and use it in GitHub Desktop.
Retest script for Identity.UW
#!/bin/bash
#https://gist.github.com/jdiverp/9d27e77aba4c9d0e2b5a11ddbe0f3748
MU='/usr/local/etc/mu -c /dd01/pass/.cconfig -h mango-eval.u.washington.edu -v -y'
clear_netids () {
REG=$1
echo Looking at NetID for RegID: $REG
NETID=`echo "seluwn reg=$REG" | $MU | sed -r 's/[[:alnum:]_]+=/\n&/g ; s/[()]//g'|egrep '^uwnetid=' |cut -d "=" -f 2`
echo Deleting NETID\(s\): $NETID
STAT=`for ids in $NETID; do echo "deluwn uwnetid=$ids -force" |$MU; done`
echo $STAT
}
clear_verify () {
VAL=$1
CODE=$2
echo "delverify source_code=0 validid=$VAL verify_code=$CODE" |$MU
}
unjoin_regids () {
REG1=$1
REG2=$2
echo "joinentity regid=$REG1 prior_regid=$REG2" | $MU
}
remove_subscription() {
NETID=$1
CODE=$2
echo "delsubscription uwnetid=$NETID subscription_code=$CODE"|$MU
}
clear_pac() {
REG=$1
SOURCE=$2
echo "setpac pac= val=reg=$REG source_code=$SOURCE"|$MU
}
# As of 2020-08-12
# test_daily.py::test_applicant_account_creation
clear_netids 05932F88A5909D8F539FC88F6465F09F
# test_daily.py::test_employee_account_creation
clear_netids FAED12ECC0F6C3F1914CC8B4DD408D52
clear_verify regid=FAED12ECC0F6C3F1914CC8B4DD408D52 83
clear_verify regid=FAED12ECC0F6C3F1914CC8B4DD408D52 84
clear_verify regid=FAED12ECC0F6C3F1914CC8B4DD408D52 85
# test_daily.py::test_join_employee_student_one_netid
unjoin_regids BCA16098B995702F71F422E391A16D8F 51C73C40B6743064F29845567FA5DA96
# test_daily.py::test_join_employee_student_two_netid
unjoin_regids A0DADE88BA567EA029D1305341B2CC2C 12D64C335A5AD7F8B88BFE21C6D36557
# test_daily.py::test_join_employee_student_two_netid
clear_verify uwnetid=nsspr00011 62
clear_verify uwnetid=nsspr00011 63
clear_verify uwnetid=nsspr00011 64
# test_signup.py::test_existing_netid_set_password
remove_subscription nsspr00016 60
# test_daily.py::test_healwa_account_creation
clear_netids 55F65C13FF124B3B8888307CB01EC0B1
clear_pac 55F65C13FF124B3B8888307CB01EC0B1 10
# test_daily.py::test_spokane_resident_account_creation
clear_pac 25B3C873AE8A4E148CC4BA65E6BB609A 20
clear_netids 25B3C873AE8A4E148CC4BA65E6BB609A
@krlowe

krlowe commented Jul 24, 2020

Copy link
Copy Markdown

The test numbers are not consistent as some tests may or may not run and new tests may get added in the middle that'll renumber everything after them. I recommend specifying the name of the test as it appears in the ToC on the report(s).

Daffy is also not longed for this world. You should be able to use seuss3x for a longer lasting server to run this -- or we can have nws run it on netid2x on demand. Subscriptions' has a "standard" eval-write-v3 config file for mu at /usr/local/lib/subman/MDSew3.cf that you can use instead of something out of your home directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment