X-Git-Url: http://git.pjr.cc/?p=gwvp-mini.git;a=blobdiff_plain;f=unittests%2Fcreatelotsofreposandusers.php;h=f75e664a825b19bcaa1dbf192417433b96741393;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hb=42069486556c27a9ceff2108970c6fe1c5333bfd;hpb=4d6a42b605b8c52c5621fb704b284e4c12672755 diff --git a/unittests/createlotsofreposandusers.php b/unittests/createlotsofreposandusers.php index e69de29..f75e664 100644 --- a/unittests/createlotsofreposandusers.php +++ b/unittests/createlotsofreposandusers.php @@ -0,0 +1,67 @@ +"; + } + + for($i = 0; $i < $nrepos; $i++) { + $reponame = randomStr(rand(6,12)); + $repodesc = "desc"; + $uid = rand(10,$nusers-1); + gwvpmini_createGitRepo($reponame, $uid, $repodesc); + echo "Created repo, $reponame owned by $uid as $repodesc
"; + } +} else { + echo "click Go to populate"; +} + +function randomStr($len) +{ + $strl = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; + + $retval = ""; + for($i=0; $i<$len; $i++) { + $retval .= $strl[rand(0,strlen($strl)-1)]; + } + + return $retval; +} +?> \ No newline at end of file