Revert "Comment out all logged flaky tests"

This reverts commit 0bd4a06edc.
This commit is contained in:
Patryk Osmaczko 2024-02-27 08:58:12 +01:00 committed by osmaczko
parent 0a1a66afa7
commit 1f42f2582a
14 changed files with 18 additions and 129 deletions

View File

@ -1,7 +1,7 @@
package api package api
import ( import (
//"context" "context"
"crypto/sha256" "crypto/sha256"
"database/sql" "database/sql"
"encoding/hex" "encoding/hex"
@ -34,8 +34,7 @@ import (
"github.com/status-im/status-go/protocol/requests" "github.com/status-im/status-go/protocol/requests"
"github.com/status-im/status-go/rpc" "github.com/status-im/status-go/rpc"
"github.com/status-im/status-go/services/typeddata" "github.com/status-im/status-go/services/typeddata"
walletservice "github.com/status-im/status-go/services/wallet"
//walletservice "github.com/status-im/status-go/services/wallet"
"github.com/status-im/status-go/signal" "github.com/status-im/status-go/signal"
"github.com/status-im/status-go/sqlite" "github.com/status-im/status-go/sqlite"
"github.com/status-im/status-go/t/helpers" "github.com/status-im/status-go/t/helpers"
@ -977,7 +976,6 @@ func TestDeleteMultiaccount(t *testing.T) {
require.Equal(t, 3, len(files)) require.Equal(t, 3, len(files))
} }
/*
func TestConvertAccount(t *testing.T) { func TestConvertAccount(t *testing.T) {
const mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" const mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
const password = "111111" // represents password for a regular user const password = "111111" // represents password for a regular user
@ -1226,7 +1224,6 @@ func TestConvertAccount(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, 0, len(keycards)) require.Equal(t, 0, len(keycards))
} }
*/
func copyFile(srcFolder string, dstFolder string, fileName string, t *testing.T) { func copyFile(srcFolder string, dstFolder string, fileName string, t *testing.T) {
data, err := ioutil.ReadFile(path.Join(srcFolder, fileName)) data, err := ioutil.ReadFile(path.Join(srcFolder, fileName))
@ -1366,7 +1363,6 @@ func TestChangeDatabasePassword(t *testing.T) {
require.Equal(t, acc.Address, key.Address) require.Equal(t, acc.Address, key.Address)
} }
/*
func TestCreateWallet(t *testing.T) { func TestCreateWallet(t *testing.T) {
utils.Init() utils.Init()
password := "some-password2" // nolint: goconst password := "some-password2" // nolint: goconst
@ -1426,7 +1422,6 @@ func TestCreateWallet(t *testing.T) {
}) })
require.NoError(t, err) require.NoError(t, err)
} }
*/
func TestSetFleet(t *testing.T) { func TestSetFleet(t *testing.T) {
utils.Init() utils.Init()

View File

@ -1,15 +1,16 @@
package api package api
//"encoding/json" import (
//"fmt" "encoding/json"
//"testing" "fmt"
//"time" "testing"
"time"
//"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
//"github.com/status-im/status-go/protocol/requests" "github.com/status-im/status-go/protocol/requests"
)
/*
func TestCreateAccountAndLogin(t *testing.T) { func TestCreateAccountAndLogin(t *testing.T) {
rootDir := t.TempDir() rootDir := t.TempDir()
t.Logf("TestCreateAccountAndLogin: rootDir: %s", rootDir) t.Logf("TestCreateAccountAndLogin: rootDir: %s", rootDir)
@ -60,4 +61,3 @@ func TestCreateAccountAndLogin(t *testing.T) {
_, err = statusBackend.CreateAccountAndLogin(&request) _, err = statusBackend.CreateAccountAndLogin(&request)
require.NoError(t, err) require.NoError(t, err)
} }
*/

View File

@ -181,7 +181,6 @@ func (s *OwnerWithoutCommunityKeyCommunityEventsSuite) TestOwnerRejectMemberRequ
testRejectMemberRequestToJoin(s, community, user) testRejectMemberRequestToJoin(s, community, user)
} }
/*
func (s *OwnerWithoutCommunityKeyCommunityEventsSuite) TestOwnerControlNodeHandlesMultipleEventSenderRequestToJoinDecisions() { func (s *OwnerWithoutCommunityKeyCommunityEventsSuite) TestOwnerControlNodeHandlesMultipleEventSenderRequestToJoinDecisions() {
additionalOwner := s.newMessenger("", []string{}) additionalOwner := s.newMessenger("", []string{})
community := setUpOnRequestCommunityAndRoles(s, protobuf.CommunityMember_ROLE_OWNER, []*Messenger{additionalOwner}) community := setUpOnRequestCommunityAndRoles(s, protobuf.CommunityMember_ROLE_OWNER, []*Messenger{additionalOwner})
@ -190,7 +189,6 @@ func (s *OwnerWithoutCommunityKeyCommunityEventsSuite) TestOwnerControlNodeHandl
user := s.newMessenger("", []string{}) user := s.newMessenger("", []string{})
testControlNodeHandlesMultipleEventSenderRequestToJoinDecisions(s, community, user, additionalOwner) testControlNodeHandlesMultipleEventSenderRequestToJoinDecisions(s, community, user, additionalOwner)
} }
*/
func (s *OwnerWithoutCommunityKeyCommunityEventsSuite) TestOwnerCreateEditDeleteCategories() { func (s *OwnerWithoutCommunityKeyCommunityEventsSuite) TestOwnerCreateEditDeleteCategories() {
community := setUpCommunityAndRoles(s, protobuf.CommunityMember_ROLE_OWNER) community := setUpCommunityAndRoles(s, protobuf.CommunityMember_ROLE_OWNER)

View File

@ -138,13 +138,11 @@ func (s *TokenMasterCommunityEventsSuite) TestTokenMasterCannotCreateBecomeToken
testEventSenderCannotCreatePrivilegedCommunityPermission(s, community, protobuf.CommunityTokenPermission_BECOME_TOKEN_MASTER) testEventSenderCannotCreatePrivilegedCommunityPermission(s, community, protobuf.CommunityTokenPermission_BECOME_TOKEN_MASTER)
} }
/*
func (s *TokenMasterCommunityEventsSuite) TestTokenMasterCannotEditBecomeAdminPermission() { func (s *TokenMasterCommunityEventsSuite) TestTokenMasterCannotEditBecomeAdminPermission() {
community := setUpCommunityAndRoles(s, protobuf.CommunityMember_ROLE_TOKEN_MASTER) community := setUpCommunityAndRoles(s, protobuf.CommunityMember_ROLE_TOKEN_MASTER)
testEventSenderCannotEditPrivilegedCommunityPermission( testEventSenderCannotEditPrivilegedCommunityPermission(
s, community, protobuf.CommunityTokenPermission_BECOME_ADMIN, protobuf.CommunityTokenPermission_BECOME_TOKEN_MASTER) s, community, protobuf.CommunityTokenPermission_BECOME_ADMIN, protobuf.CommunityTokenPermission_BECOME_TOKEN_MASTER)
} }
*/
func (s *TokenMasterCommunityEventsSuite) TestTokenMasterCannotEditBecomeTokenMasterPermission() { func (s *TokenMasterCommunityEventsSuite) TestTokenMasterCannotEditBecomeTokenMasterPermission() {
community := setUpCommunityAndRoles(s, protobuf.CommunityMember_ROLE_TOKEN_MASTER) community := setUpCommunityAndRoles(s, protobuf.CommunityMember_ROLE_TOKEN_MASTER)
@ -203,7 +201,6 @@ func (s *TokenMasterCommunityEventsSuite) TestTokenMasterRejectMemberRequestToJo
testRejectMemberRequestToJoin(s, community, user) testRejectMemberRequestToJoin(s, community, user)
} }
/*
func (s *TokenMasterCommunityEventsSuite) TestTokenMasterControlNodeHandlesMultipleEventSenderRequestToJoinDecisions() { func (s *TokenMasterCommunityEventsSuite) TestTokenMasterControlNodeHandlesMultipleEventSenderRequestToJoinDecisions() {
additionalTokenMaster := s.newMessenger("qwerty", []string{eventsSenderAccountAddress}) additionalTokenMaster := s.newMessenger("qwerty", []string{eventsSenderAccountAddress})
community := setUpOnRequestCommunityAndRoles(s, protobuf.CommunityMember_ROLE_TOKEN_MASTER, []*Messenger{additionalTokenMaster}) community := setUpOnRequestCommunityAndRoles(s, protobuf.CommunityMember_ROLE_TOKEN_MASTER, []*Messenger{additionalTokenMaster})
@ -212,7 +209,6 @@ func (s *TokenMasterCommunityEventsSuite) TestTokenMasterControlNodeHandlesMulti
user := s.newMessenger("", []string{}) user := s.newMessenger("", []string{})
testControlNodeHandlesMultipleEventSenderRequestToJoinDecisions(s, community, user, additionalTokenMaster) testControlNodeHandlesMultipleEventSenderRequestToJoinDecisions(s, community, user, additionalTokenMaster)
} }
*/
func (s *TokenMasterCommunityEventsSuite) TestTokenMasterCreateEditDeleteCategories() { func (s *TokenMasterCommunityEventsSuite) TestTokenMasterCreateEditDeleteCategories() {
community := setUpCommunityAndRoles(s, protobuf.CommunityMember_ROLE_TOKEN_MASTER) community := setUpCommunityAndRoles(s, protobuf.CommunityMember_ROLE_TOKEN_MASTER)

View File

@ -16,6 +16,7 @@ import (
"github.com/status-im/status-go/protocol/communities/token" "github.com/status-im/status-go/protocol/communities/token"
"github.com/status-im/status-go/protocol/protobuf" "github.com/status-im/status-go/protocol/protobuf"
"github.com/status-im/status-go/protocol/requests" "github.com/status-im/status-go/protocol/requests"
"github.com/status-im/status-go/protocol/tt"
"github.com/status-im/status-go/services/communitytokens" "github.com/status-im/status-go/services/communitytokens"
"github.com/status-im/status-go/services/wallet/bigint" "github.com/status-im/status-go/services/wallet/bigint"
) )
@ -1405,7 +1406,6 @@ func testRejectMemberRequestToJoin(base CommunityEventsTestsInterface, community
s.Require().Len(declinedRequestsPending, 0) s.Require().Len(declinedRequestsPending, 0)
} }
/*
func testControlNodeHandlesMultipleEventSenderRequestToJoinDecisions(base CommunityEventsTestsInterface, community *communities.Community, user *Messenger, additionalEventSender *Messenger) { func testControlNodeHandlesMultipleEventSenderRequestToJoinDecisions(base CommunityEventsTestsInterface, community *communities.Community, user *Messenger, additionalEventSender *Messenger) {
_, err := user.Start() _, err := user.Start()
@ -1516,7 +1516,6 @@ func testControlNodeHandlesMultipleEventSenderRequestToJoinDecisions(base Commun
}) })
s.Require().NoError(err) s.Require().NoError(err)
} }
*/
func testCreateEditDeleteCategories(base CommunityEventsTestsInterface, community *communities.Community) { func testCreateEditDeleteCategories(base CommunityEventsTestsInterface, community *communities.Community) {
newCategory := &requests.CreateCommunityCategory{ newCategory := &requests.CreateCommunityCategory{

View File

@ -211,7 +211,6 @@ func (s *AdminCommunityEventsSuite) TestAdminRejectMemberRequestToJoin() {
testRejectMemberRequestToJoin(s, community, user) testRejectMemberRequestToJoin(s, community, user)
} }
/*
func (s *AdminCommunityEventsSuite) TestAdminControlNodeHandlesMultipleEventSenderRequestToJoinDecisions() { func (s *AdminCommunityEventsSuite) TestAdminControlNodeHandlesMultipleEventSenderRequestToJoinDecisions() {
additionalAdmin := s.newMessenger("qwerty", []string{eventsSenderAccountAddress}) additionalAdmin := s.newMessenger("qwerty", []string{eventsSenderAccountAddress})
community := setUpOnRequestCommunityAndRoles(s, protobuf.CommunityMember_ROLE_ADMIN, []*Messenger{additionalAdmin}) community := setUpOnRequestCommunityAndRoles(s, protobuf.CommunityMember_ROLE_ADMIN, []*Messenger{additionalAdmin})
@ -220,7 +219,6 @@ func (s *AdminCommunityEventsSuite) TestAdminControlNodeHandlesMultipleEventSend
user := s.newMessenger("", []string{}) user := s.newMessenger("", []string{})
testControlNodeHandlesMultipleEventSenderRequestToJoinDecisions(s, community, user, additionalAdmin) testControlNodeHandlesMultipleEventSenderRequestToJoinDecisions(s, community, user, additionalAdmin)
} }
*/
func (s *AdminCommunityEventsSuite) TestAdminCreateEditDeleteCategories() { func (s *AdminCommunityEventsSuite) TestAdminCreateEditDeleteCategories() {
community := setUpCommunityAndRoles(s, protobuf.CommunityMember_ROLE_ADMIN) community := setUpCommunityAndRoles(s, protobuf.CommunityMember_ROLE_ADMIN)
@ -325,78 +323,6 @@ func (s *AdminCommunityEventsSuite) TestMemberReceiveOwnerEventsWhenControlNodeO
testMemberReceiveEventsWhenControlNodeOffline(s, community) testMemberReceiveEventsWhenControlNodeOffline(s, community)
} }
/*
func (s *AdminCommunityEventsSuite) TestAdminResendRejectedEvents() {
community := setUpCommunityAndRoles(s, protobuf.CommunityMember_ROLE_ADMIN)
// admin modifies community description
adminEditRequest := &requests.EditCommunity{
CommunityID: community.ID(),
CreateCommunity: requests.CreateCommunity{
Name: "admin name",
Description: "admin description",
Color: "#FFFFFF",
Membership: protobuf.CommunityPermissions_MANUAL_ACCEPT,
},
}
_, err := s.admin.EditCommunity(adminEditRequest)
s.Require().NoError(err)
// in the meantime, control node updates community description as well
ownerEditRequest := &requests.EditCommunity{
CommunityID: community.ID(),
CreateCommunity: requests.CreateCommunity{
Name: "control node name",
Description: "control node description",
Color: "#FFFFFF",
Membership: protobuf.CommunityPermissions_MANUAL_ACCEPT,
},
}
_, err = s.owner.EditCommunity(ownerEditRequest)
s.Require().NoError(err)
waitOnAdminEventsRejection := waitOnCommunitiesEvent(s.owner, func(s *communities.Subscription) bool {
return s.CommunityEventsMessageInvalidClock != nil
})
// control node receives admin event and rejects it
_, err = WaitOnMessengerResponse(s.owner, func(response *MessengerResponse) bool {
select {
case err := <-waitOnAdminEventsRejection:
s.Require().NoError(err)
return true
default:
return false
}
}, "")
s.Require().NoError(err)
community, err = s.owner.communitiesManager.GetByID(community.ID())
s.Require().NoError(err)
s.Require().Equal(ownerEditRequest.Description, community.DescriptionText())
// admin receives rejected events and re-applies them
// there is no signal whatsoever, we just wait for admin to process all incoming messages
_, _ = WaitOnMessengerResponse(s.admin, func(response *MessengerResponse) bool {
return false
}, "")
// control node receives re-applied admin event and accepts it
response, err := WaitOnMessengerResponse(s.owner, func(response *MessengerResponse) bool {
return len(response.Communities()) > 0
}, "no communities in response")
s.Require().NoError(err)
s.Require().Equal(adminEditRequest.Description, response.Communities()[0].DescriptionText())
// admin receives updated community description
response, err = WaitOnMessengerResponse(s.admin, func(response *MessengerResponse) bool {
return len(response.Communities()) > 0
}, "no communities in response")
s.Require().NoError(err)
s.Require().Equal(adminEditRequest.Description, response.Communities()[0].DescriptionText())
}
*/
func (s *AdminCommunityEventsSuite) TestJoinedAdminReceiveRequestsToJoinWithoutRevealedAccounts() { func (s *AdminCommunityEventsSuite) TestJoinedAdminReceiveRequestsToJoinWithoutRevealedAccounts() {
community := setUpOnRequestCommunityAndRoles(s, protobuf.CommunityMember_ROLE_ADMIN, []*Messenger{}) community := setUpOnRequestCommunityAndRoles(s, protobuf.CommunityMember_ROLE_ADMIN, []*Messenger{})

View File

@ -1,15 +1,18 @@
package protocol package protocol
import ( import (
"bytes"
"context" "context"
"testing" "testing"
"time" "time"
"github.com/golang/protobuf/proto"
"github.com/stretchr/testify/suite" "github.com/stretchr/testify/suite"
"go.uber.org/zap" "go.uber.org/zap"
gethcommon "github.com/ethereum/go-ethereum/common" gethcommon "github.com/ethereum/go-ethereum/common"
hexutil "github.com/ethereum/go-ethereum/common/hexutil" hexutil "github.com/ethereum/go-ethereum/common/hexutil"
utils "github.com/status-im/status-go/common"
gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" gethbridge "github.com/status-im/status-go/eth-node/bridge/geth"
"github.com/status-im/status-go/eth-node/types" "github.com/status-im/status-go/eth-node/types"
@ -577,7 +580,6 @@ func (s *MessengerCommunitiesSignersSuite) TestNewOwnerAcceptRequestToJoin() {
} }
/*
func (s *MessengerCommunitiesSignersSuite) testDescriptionSignature(description []byte) { func (s *MessengerCommunitiesSignersSuite) testDescriptionSignature(description []byte) {
var amm protobuf.ApplicationMetadataMessage var amm protobuf.ApplicationMetadataMessage
err := proto.Unmarshal(description, &amm) err := proto.Unmarshal(description, &amm)
@ -587,9 +589,7 @@ func (s *MessengerCommunitiesSignersSuite) testDescriptionSignature(description
s.Require().NoError(err) s.Require().NoError(err)
s.NotNil(signer) s.NotNil(signer)
} }
*/
/*
func (s *MessengerCommunitiesSignersSuite) forceCommunityChange(community *communities.Community, owner *Messenger, user *Messenger) { func (s *MessengerCommunitiesSignersSuite) forceCommunityChange(community *communities.Community, owner *Messenger, user *Messenger) {
newDescription := community.DescriptionText() + " new" newDescription := community.DescriptionText() + " new"
_, err := owner.EditCommunity(&requests.EditCommunity{ _, err := owner.EditCommunity(&requests.EditCommunity{
@ -609,9 +609,7 @@ func (s *MessengerCommunitiesSignersSuite) forceCommunityChange(community *commu
}, "new description not received") }, "new description not received")
s.Require().NoError(err) s.Require().NoError(err)
} }
*/
/*
func (s *MessengerCommunitiesSignersSuite) testSyncCommunity(mintOwnerToken bool) { func (s *MessengerCommunitiesSignersSuite) testSyncCommunity(mintOwnerToken bool) {
community := s.createCommunity(s.john) community := s.createCommunity(s.john)
s.advertiseCommunityTo(s.john, community, s.alice) s.advertiseCommunityTo(s.john, community, s.alice)
@ -715,9 +713,7 @@ func (s *MessengerCommunitiesSignersSuite) testSyncCommunity(mintOwnerToken bool
s.Require().Equal(community.IDString(), responseCommunity.IDString()) s.Require().Equal(community.IDString(), responseCommunity.IDString())
s.Require().True(common.IsPubKeyEqual(expectedControlNode, responseCommunity.ControlNode())) s.Require().True(common.IsPubKeyEqual(expectedControlNode, responseCommunity.ControlNode()))
} }
*/
/*
func (s *MessengerCommunitiesSignersSuite) TestSyncTokenGatedCommunity() { func (s *MessengerCommunitiesSignersSuite) TestSyncTokenGatedCommunity() {
testCases := []struct { testCases := []struct {
name string name string
@ -739,4 +735,3 @@ func (s *MessengerCommunitiesSignersSuite) TestSyncTokenGatedCommunity() {
}) })
} }
} }
*/

View File

@ -1178,7 +1178,6 @@ func (s *MessengerCommunitiesSuite) TestDeletePendingRequestAccess() {
} }
/*
func (s *MessengerCommunitiesSuite) TestDeletePendingRequestAccessWithDeclinedState() { func (s *MessengerCommunitiesSuite) TestDeletePendingRequestAccessWithDeclinedState() {
ctx := context.Background() ctx := context.Background()
@ -1430,9 +1429,7 @@ func (s *MessengerCommunitiesSuite) TestDeletePendingRequestAccessWithDeclinedSt
s.Require().False(notification.Deleted) s.Require().False(notification.Deleted)
} }
*/
/*
func (s *MessengerCommunitiesSuite) TestCancelRequestAccess() { func (s *MessengerCommunitiesSuite) TestCancelRequestAccess() {
ctx := context.Background() ctx := context.Background()
@ -1609,7 +1606,6 @@ func (s *MessengerCommunitiesSuite) TestCancelRequestAccess() {
s.Require().Equal(communities.RequestToJoinStateCanceled, cancelRequestToJoin2.State) s.Require().Equal(communities.RequestToJoinStateCanceled, cancelRequestToJoin2.State)
} }
*/
func (s *MessengerCommunitiesSuite) TestRequestAccessAgain() { func (s *MessengerCommunitiesSuite) TestRequestAccessAgain() {
description := &requests.CreateCommunity{ description := &requests.CreateCommunity{

View File

@ -693,7 +693,6 @@ func (s *MessengerBackupSuite) TestBackupCommunities() {
s.Require().Equal(clock, lastBackup) s.Require().Equal(clock, lastBackup)
} }
/*
func (s *MessengerBackupSuite) TestBackupKeypairs() { func (s *MessengerBackupSuite) TestBackupKeypairs() {
// Create bob1 // Create bob1
bob1 := s.m bob1 := s.m
@ -747,7 +746,6 @@ func (s *MessengerBackupSuite) TestBackupKeypairs() {
s.Require().NoError(err) s.Require().NoError(err)
s.Require().True(accounts.SameKeypairsWithDifferentSyncedFrom(seedKp, dbSeedKp2, false, accounts.SyncedFromBackup, accounts.AccountNonOperable)) s.Require().True(accounts.SameKeypairsWithDifferentSyncedFrom(seedKp, dbSeedKp2, false, accounts.SyncedFromBackup, accounts.AccountNonOperable))
} }
*/
func (s *MessengerBackupSuite) TestBackupKeycards() { func (s *MessengerBackupSuite) TestBackupKeycards() {
// Create bob1 // Create bob1

View File

@ -3,8 +3,7 @@ package protocol
import ( import (
"context" "context"
"crypto/ecdsa" "crypto/ecdsa"
"errors"
//"errors"
"testing" "testing"
"github.com/stretchr/testify/suite" "github.com/stretchr/testify/suite"
@ -106,7 +105,6 @@ func (s *MessengerDeleteMessageForMeSuite) Pair() {
s.Require().NoError(err) s.Require().NoError(err)
} }
/*
func (s *MessengerDeleteMessageForMeSuite) TestDeleteMessageForMe() { func (s *MessengerDeleteMessageForMeSuite) TestDeleteMessageForMe() {
s.Pair() s.Pair()
chatID := "foobarsynctest" chatID := "foobarsynctest"
@ -209,7 +207,6 @@ func (s *MessengerDeleteMessageForMeSuite) TestDeleteMessageForMe() {
s.Require().NoError(err) s.Require().NoError(err)
s.Require().False(otherMessage.DeletedForMe) s.Require().False(otherMessage.DeletedForMe)
} }
*/
func (s *MessengerDeleteMessageForMeSuite) TestDeleteImageMessageFromReceiverSide() { func (s *MessengerDeleteMessageForMeSuite) TestDeleteImageMessageFromReceiverSide() {

View File

@ -445,7 +445,6 @@ func (s *MessengerSyncWalletSuite) TestSyncWalletAccountsReorder() {
s.Require().Equal(dbClock, dbClockOtherDevice) s.Require().Equal(dbClock, dbClockOtherDevice)
} }
/*
func (s *MessengerSyncWalletSuite) TestSyncWalletAccountOrderAfterDeletion() { func (s *MessengerSyncWalletSuite) TestSyncWalletAccountOrderAfterDeletion() {
profileKp := accounts.GetProfileKeypairForTest(true, true, true) profileKp := accounts.GetProfileKeypairForTest(true, true, true)
// set clocks for accounts // set clocks for accounts
@ -545,11 +544,9 @@ func (s *MessengerSyncWalletSuite) TestSyncWalletAccountOrderAfterDeletion() {
return err return err
} }
// we don't include chat account in position ordering
if len(response.Keypairs) != 3 || // 3 keypairs (profile, seed, priv key) if len(response.Keypairs) != 3 || // 3 keypairs (profile, seed, priv key)
len(response.WatchOnlyAccounts) != len(woAccounts) || len(response.WatchOnlyAccounts) != len(woAccounts) ||
len(response.AccountsPositions) != totalNumOfAccounts-1 len(response.AccountsPositions) != totalNumOfAccounts-1 /* we don't include chat account in position ordering*/ {
{
return errors.New("no sync wallet account received") return errors.New("no sync wallet account received")
} }
return nil return nil
@ -622,4 +619,3 @@ func (s *MessengerSyncWalletSuite) TestSyncWalletAccountOrderAfterDeletion() {
s.Require().True(haveSameElements(dbAccounts1, dbAccounts2, accounts.SameAccountsIncludingPosition)) s.Require().True(haveSameElements(dbAccounts1, dbAccounts2, accounts.SameAccountsIncludingPosition))
} }
*/

View File

@ -239,7 +239,6 @@ func (s *ShhExtSuite) TearDownTest() {
s.services = nil s.services = nil
} }
/*
func (s *ShhExtSuite) TestRequestMessagesSuccess() { func (s *ShhExtSuite) TestRequestMessagesSuccess() {
// two nodes needed: client and mailserver // two nodes needed: client and mailserver
s.createAndAddNode() s.createAndAddNode()
@ -257,7 +256,6 @@ func (s *ShhExtSuite) TestRequestMessagesSuccess() {
}) })
s.NoError(err) s.NoError(err)
} }
*/
func (s *ShhExtSuite) TestMultipleRequestMessagesWithoutForce() { func (s *ShhExtSuite) TestMultipleRequestMessagesWithoutForce() {
// two nodes needed: client and mailserver // two nodes needed: client and mailserver

View File

@ -124,7 +124,6 @@ func TestRequestPermission(t *testing.T) {
require.Error(t, err) require.Error(t, err)
} }
/*
func TestWeb3Call(t *testing.T) { func TestWeb3Call(t *testing.T) {
api, cancel := setupTestAPI(t) api, cancel := setupTestAPI(t)
defer cancel() defer cancel()
@ -166,7 +165,6 @@ func TestWeb3Call(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, data, response.Result.(JSONRPCResponse).Result) require.Equal(t, data, response.Result.(JSONRPCResponse).Result)
} }
*/
func TestWeb3Signature(t *testing.T) { func TestWeb3Signature(t *testing.T) {
api, cancel := setupTestAPI(t) api, cancel := setupTestAPI(t)

View File

@ -2,11 +2,10 @@ package transactions
import ( import (
"context" "context"
//"database/sql" "database/sql"
"encoding/json" "encoding/json"
"math/big" "math/big"
"sync"
//"sync"
"testing" "testing"
"time" "time"
@ -423,7 +422,6 @@ func TestPendingTxTracker_Watch(t *testing.T) {
sub.Unsubscribe() sub.Unsubscribe()
} }
/*
func TestPendingTxTracker_Watch_StatusChangeIncrementally(t *testing.T) { func TestPendingTxTracker_Watch_StatusChangeIncrementally(t *testing.T) {
m, stop, chainClient, eventFeed := setupTestTransactionDB(t, common.NewAndSet(1*time.Nanosecond)) m, stop, chainClient, eventFeed := setupTestTransactionDB(t, common.NewAndSet(1*time.Nanosecond))
defer stop() defer stop()
@ -538,7 +536,6 @@ func TestPendingTxTracker_Watch_StatusChangeIncrementally(t *testing.T) {
sub.Unsubscribe() sub.Unsubscribe()
} }
*/
func TestPendingTransactions(t *testing.T) { func TestPendingTransactions(t *testing.T) {
manager, stop, _, _ := setupTestTransactionDB(t, nil) manager, stop, _, _ := setupTestTransactionDB(t, nil)