MM-15276: Migrate Team.Update to sync by default (#10693)

* MM-15276: Migrate Team.Update to sync by default

* MM-15276: Addressing review comments and change Update func signature similar to other interface Update method

* update store mocks for update fn

* addressing review comments
This commit is contained in:
Puneeth Reddy
2019-04-25 06:29:02 -07:00
committed by Jesús Espino
parent b24013d54c
commit ec95793b90
17 changed files with 109 additions and 111 deletions

View File

@@ -13,7 +13,7 @@ var mainHelper *testlib.MainHelper
func TestMain(m *testing.M) {
var options = testlib.HelperOptions{
EnableStore: true,
EnableStore: true,
EnableResources: true,
}

View File

@@ -602,7 +602,6 @@ func TestUpdatePost(t *testing.T) {
assert.NotEqual(t, rpost3.EditAt, rrupost3.EditAt)
assert.NotEqual(t, rpost3.Attachments(), rrupost3.Attachments())
Client.Logout()
_, resp = Client.UpdatePost(rpost.Id, rpost)
CheckUnauthorizedStatus(t, resp)

View File

@@ -304,9 +304,8 @@ func TestGetTeamsForScheme(t *testing.T) {
assert.Zero(t, len(l2))
team1.SchemeId = &scheme1.Id
result2 := <-th.App.Srv.Store.Team().Update(team1)
assert.Nil(t, result2.Err)
team1 = result2.Data.(*model.Team)
team1, err := th.App.Srv.Store.Team().Update(team1)
assert.Nil(t, err)
l3, r3 := th.SystemAdminClient.GetTeamsForScheme(scheme1.Id, 0, 100)
CheckNoError(t, r3)