Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

Commit b4b47d2

Browse files
mehmetalisavascihangir
authored andcommitted
go/account: go fmt accountdelete files
1 parent 4ea97c2 commit b4b47d2

2 files changed

Lines changed: 21 additions & 21 deletions

File tree

‎go/src/socialapi/scripts/accountdeleter/accountdelete.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func main() {
2626
defer modelhelper.Close()
2727

2828
if err := models.DeleteDiffedDBAccounts(); err != nil {
29-
fmt.Println("error while deleting account that non-existing in mongo",err)
29+
fmt.Println("error while deleting account that non-existing in mongo", err)
3030
return
3131
}
3232

‎go/src/socialapi/scripts/accountdeleter/accountdelete_test.go‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ func TestAccountCreation(t *testing.T) {
5555
})
5656
})
5757
Convey("Users creation should be succussfully", func() {
58-
err := accountCreatorWithCount(10)
59-
So(err,ShouldBeNil)
60-
Convey("Users should be in postgre with many accounts", func() {
61-
accounts, err := models.FetchAccountsWithBongoOffset(100, 0)
62-
So(err,ShouldBeNil)
63-
So(len(accounts), ShouldBeGreaterThan, 9)
64-
})
65-
Convey("Users should not be in postgre after deleting accounts", func() {
66-
err := models.DeleteDiffedDBAccounts()
67-
So(err, ShouldBeNil)
68-
})
58+
err := accountCreatorWithCount(10)
59+
So(err, ShouldBeNil)
60+
Convey("Users should be in postgre with many accounts", func() {
61+
accounts, err := models.FetchAccountsWithBongoOffset(100, 0)
62+
So(err, ShouldBeNil)
63+
So(len(accounts), ShouldBeGreaterThan, 9)
64+
})
65+
Convey("Users should not be in postgre after deleting accounts", func() {
66+
err := models.DeleteDiffedDBAccounts()
67+
So(err, ShouldBeNil)
68+
})
6969
})
7070
})
7171
})
@@ -74,13 +74,13 @@ func TestAccountCreation(t *testing.T) {
7474
}
7575

7676
func accountCreatorWithCount(count int) error {
77-
for i := 0 ; i< count ; i ++{
78-
account := models.NewAccount()
79-
account.OldId = bson.NewObjectId().Hex()
80-
account, err := rest.CreateAccount(account)
81-
if err != nil {
82-
return err
83-
}
84-
}
85-
return nil
77+
for i := 0; i < count; i++ {
78+
account := models.NewAccount()
79+
account.OldId = bson.NewObjectId().Hex()
80+
account, err := rest.CreateAccount(account)
81+
if err != nil {
82+
return err
83+
}
84+
}
85+
return nil
8686
}

0 commit comments

Comments
 (0)