diff options
author | Michael Muré <batolettre@gmail.com> | 2021-02-14 11:36:32 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2021-02-14 12:19:50 +0100 |
commit | 3f6ef50883492f77995a7e27872d0b5ae17b9d6a (patch) | |
tree | 97677642f1b01c73c8c5a708ea0ec67ced8c402f /misc/random_bugs | |
parent | 99b9dd84cb4b0cfd3eb1fd50b07c8b826eb52d19 (diff) | |
download | git-bug-3f6ef50883492f77995a7e27872d0b5ae17b9d6a.tar.gz |
bug: migrate to the DAG entity structure!
Diffstat (limited to 'misc/random_bugs')
-rw-r--r-- | misc/random_bugs/create_random_bugs.go | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/misc/random_bugs/create_random_bugs.go b/misc/random_bugs/create_random_bugs.go index 3d93135e..a69918f4 100644 --- a/misc/random_bugs/create_random_bugs.go +++ b/misc/random_bugs/create_random_bugs.go @@ -111,52 +111,6 @@ func generateRandomBugsWithSeed(opts Options, seed int64) []*bug.Bug { return result } -func GenerateRandomOperationPacks(packNumber int, opNumber int) []*bug.OperationPack { - return GenerateRandomOperationPacksWithSeed(packNumber, opNumber, time.Now().UnixNano()) -} - -func GenerateRandomOperationPacksWithSeed(packNumber int, opNumber int, seed int64) []*bug.OperationPack { - // Note: this is a bit crude, only generate a Create + Comments - - panic("this piece of code needs to be updated to make sure that the identities " + - "are properly commit before usage. That is, generateRandomPersons() need to be called.") - - rand.Seed(seed) - fake.Seed(seed) - - result := make([]*bug.OperationPack, packNumber) - - for i := 0; i < packNumber; i++ { - opp := &bug.OperationPack{} - - var op bug.Operation - - op = bug.NewCreateOp( - randomPerson(), - time.Now().Unix(), - fake.Sentence(), - paragraphs(), - nil, - ) - - opp.Append(op) - - for j := 0; j < opNumber-1; j++ { - op = bug.NewAddCommentOp( - randomPerson(), - time.Now().Unix(), - paragraphs(), - nil, - ) - opp.Append(op) - } - - result[i] = opp - } - - return result -} - func person(repo repository.RepoClock) (*identity.Identity, error) { return identity.NewIdentity(repo, fake.FullName(), fake.EmailAddress()) } |