From 848b4c60a382b2bc3ae7cec9d9ef117ca44a1258 Mon Sep 17 00:00:00 2001 From: Christopher Moussa Date: Mon, 12 Jul 2021 11:59:30 -0700 Subject: [PATCH] t: add "default_bank" field in payload data --- t/t1001-mf-priority-basic.t | 4 ++-- t/t1002-mf-priority-small-no-tie.t | 14 +++++++------- t/t1003-mf-priority-small-tie.t | 16 ++++++++-------- t/t1004-mf-priority-small-tie-all.t | 18 +++++++++--------- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/t/t1001-mf-priority-basic.t b/t/t1001-mf-priority-basic.t index 939432da..4daac391 100755 --- a/t/t1001-mf-priority-basic.t +++ b/t/t1001-mf-priority-basic.t @@ -45,9 +45,9 @@ test_expect_success 'create fake_payload.py' ' username = getpass.getuser() userid = pwd.getpwnam(username).pw_uid # create a JSON payload - data = {"userid": str(userid), "bank": "account3", "fairshare": "0.45321"} + data = {"userid": str(userid), "bank": "account3", "default_bank": "account3", "fairshare": "0.45321"} flux.Flux().rpc("job-manager.mf_priority.rec_update", data).get() - data = {"userid": str(userid), "bank": "account2", "fairshare": "0.11345"} + data = {"userid": str(userid), "bank": "account2", "default_bank": "account3", "fairshare": "0.11345"} flux.Flux().rpc("job-manager.mf_priority.rec_update", data).get() EOF ' diff --git a/t/t1002-mf-priority-small-no-tie.t b/t/t1002-mf-priority-small-no-tie.t index 9945c364..22470ceb 100755 --- a/t/t1002-mf-priority-small-no-tie.t +++ b/t/t1002-mf-priority-small-no-tie.t @@ -25,13 +25,13 @@ test_expect_success 'create a group of users with unique fairshare values' ' cat <<-EOF >fake_small_no_tie.json { "users" : [ - {"userid": "5011", "bank": "account1", "fairshare": "0.285714"}, - {"userid": "5012", "bank": "account1", "fairshare": "0.142857"}, - {"userid": "5013", "bank": "account1", "fairshare": "0.428571"}, - {"userid": "5021", "bank": "account2", "fairshare": "0.714286"}, - {"userid": "5022", "bank": "account2", "fairshare": "0.571429"}, - {"userid": "5031", "bank": "account3", "fairshare": "1.0"}, - {"userid": "5032", "bank": "account3", "fairshare": "0.857143"} + {"userid": "5011", "bank": "account1", "default_bank": "account1", "fairshare": "0.285714"}, + {"userid": "5012", "bank": "account1", "default_bank": "account1", "fairshare": "0.142857"}, + {"userid": "5013", "bank": "account1", "default_bank": "account1", "fairshare": "0.428571"}, + {"userid": "5021", "bank": "account2", "default_bank": "account2", "fairshare": "0.714286"}, + {"userid": "5022", "bank": "account2", "default_bank": "account2", "fairshare": "0.571429"}, + {"userid": "5031", "bank": "account3", "default_bank": "account3", "fairshare": "1.0"}, + {"userid": "5032", "bank": "account3", "default_bank": "account3", "fairshare": "0.857143"} ] } EOF diff --git a/t/t1003-mf-priority-small-tie.t b/t/t1003-mf-priority-small-tie.t index a38d6948..4ef3eb0e 100755 --- a/t/t1003-mf-priority-small-tie.t +++ b/t/t1003-mf-priority-small-tie.t @@ -25,14 +25,14 @@ test_expect_success 'create a group of users with some ties in fairshare values' cat <<-EOF >fake_small_tie.json { "users" : [ - {"userid": "5011", "bank": "account1", "fairshare": "0.5"}, - {"userid": "5012", "bank": "account1", "fairshare": "0.5"}, - {"userid": "5013", "bank": "account1", "fairshare": "0.75"}, - {"userid": "5021", "bank": "account2", "fairshare": "0.5"}, - {"userid": "5022", "bank": "account2", "fairshare": "0.5"}, - {"userid": "5023", "bank": "account2", "fairshare": "0.75"}, - {"userid": "5031", "bank": "account3", "fairshare": "1.0"}, - {"userid": "5032", "bank": "account3", "fairshare": "0.875"} + {"userid": "5011", "bank": "account1", "default_bank": "account1", "fairshare": "0.5"}, + {"userid": "5012", "bank": "account1", "default_bank": "account1", "fairshare": "0.5"}, + {"userid": "5013", "bank": "account1", "default_bank": "account1", "fairshare": "0.75"}, + {"userid": "5021", "bank": "account2", "default_bank": "account2", "fairshare": "0.5"}, + {"userid": "5022", "bank": "account2", "default_bank": "account2", "fairshare": "0.5"}, + {"userid": "5023", "bank": "account2", "default_bank": "account2", "fairshare": "0.75"}, + {"userid": "5031", "bank": "account3", "default_bank": "account3", "fairshare": "1.0"}, + {"userid": "5032", "bank": "account3", "default_bank": "account3", "fairshare": "0.875"} ] } EOF diff --git a/t/t1004-mf-priority-small-tie-all.t b/t/t1004-mf-priority-small-tie-all.t index df58e9e5..32cc1b90 100755 --- a/t/t1004-mf-priority-small-tie-all.t +++ b/t/t1004-mf-priority-small-tie-all.t @@ -25,15 +25,15 @@ test_expect_success 'create a group of users with many ties in fairshare values' cat <<-EOF >fake_small_tie_all.json { "users" : [ - {"userid": "5011", "bank": "account1", "fairshare": "0.666667"}, - {"userid": "5012", "bank": "account1", "fairshare": "0.666667"}, - {"userid": "5013", "bank": "account1", "fairshare": "1"}, - {"userid": "5021", "bank": "account2", "fairshare": "0.666667"}, - {"userid": "5022", "bank": "account2", "fairshare": "0.666667"}, - {"userid": "5023", "bank": "account2", "fairshare": "1"}, - {"userid": "5031", "bank": "account3", "fairshare": "0.666667"}, - {"userid": "5032", "bank": "account3", "fairshare": "0.666667"}, - {"userid": "5033", "bank": "account3", "fairshare": "1"} + {"userid": "5011", "bank": "account1", "default_bank": "account1", "fairshare": "0.666667"}, + {"userid": "5012", "bank": "account1", "default_bank": "account1", "fairshare": "0.666667"}, + {"userid": "5013", "bank": "account1", "default_bank": "account1", "fairshare": "1"}, + {"userid": "5021", "bank": "account2", "default_bank": "account2", "fairshare": "0.666667"}, + {"userid": "5022", "bank": "account2", "default_bank": "account2", "fairshare": "0.666667"}, + {"userid": "5023", "bank": "account2", "default_bank": "account2", "fairshare": "1"}, + {"userid": "5031", "bank": "account3", "default_bank": "account3", "fairshare": "0.666667"}, + {"userid": "5032", "bank": "account3", "default_bank": "account3", "fairshare": "0.666667"}, + {"userid": "5033", "bank": "account3", "default_bank": "account3", "fairshare": "1"} ] } EOF