skip tutorial steps for sysadmin, user-1 and user-2 from generated sample data (#10387)

This commit is contained in:
Saturnino Abril
2019-03-01 20:11:38 +08:00
committed by GitHub
parent a3ee3ac193
commit d85dff81a8

View File

@@ -399,15 +399,18 @@ func createUser(idx int, teamMemberships int, channelMemberships int, teamsAndCh
nickname = fake.Company() nickname = fake.Company()
} }
// Half of users skip tutorial // sysadmin, user-1 and user-2 users skip tutorial steps
// Other half of users also skip tutorial steps
tutorialStep := "999" tutorialStep := "999"
switch rand.Intn(6) { if idx > 2 {
case 1: switch rand.Intn(6) {
tutorialStep = "1" case 1:
case 2: tutorialStep = "1"
tutorialStep = "2" case 2:
case 3: tutorialStep = "2"
tutorialStep = "3" case 3:
tutorialStep = "3"
}
} }
teams := []app.UserTeamImportData{} teams := []app.UserTeamImportData{}