Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run foldersync tests separately #307

Merged
merged 3 commits into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,32 @@ jobs:
run: |
go get -v -t -d ./...
- name: Test
run: go test -race ./...
run: SKIP_FOLDERSYNC=true go test -race ./...

test-foldersync:
name: Foldersync Test
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14
- name: Check out code
uses: actions/checkout@v1
- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
go get -v -t -d ./...
- name: Test
run: go test ./integrationtests/foldersync/

android-client:
name: Android Client Test
Expand Down
13 changes: 10 additions & 3 deletions integrationtests/foldersync/foldersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ func TestMain(m *testing.M) {
}

func TestSimple(t *testing.T) {
if os.Getenv("SKIP_FOLDERSYNC") != "" {
t.Skip("Skipping foldersync tests")
}

id := thread.NewIDV1(thread.Raw, 32)

// db0
Expand Down Expand Up @@ -135,6 +139,9 @@ func TestSimple(t *testing.T) {
}

func TestNUsersBootstrap(t *testing.T) {
if os.Getenv("SKIP_FOLDERSYNC") != "" {
t.Skip("Skipping foldersync tests")
}
tests := []struct {
totalClients int
totalCorePeers int
Expand All @@ -144,12 +151,12 @@ func TestNUsersBootstrap(t *testing.T) {
checkSyncedFiles bool
}{
{totalClients: 2, totalCorePeers: 1, syncTimeout: time.Second * 5},
// {totalClients: 3, totalCorePeers: 1, syncTimeout: time.Second * 15},
{totalClients: 3, totalCorePeers: 1, syncTimeout: time.Second * 15},

// {totalClients: 3, totalCorePeers: 2, syncTimeout: time.Second * 20},
{totalClients: 3, totalCorePeers: 2, syncTimeout: time.Second * 20},

{totalClients: 2, totalCorePeers: 1, syncTimeout: time.Second * 10, randFilesGen: 4, randFileSize: 10},
// {totalClients: 3, totalCorePeers: 2, syncTimeout: time.Second * 20, randFilesGen: 4, randFileSize: 10},
{totalClients: 3, totalCorePeers: 2, syncTimeout: time.Second * 20, randFilesGen: 4, randFileSize: 10},
}

for _, tt := range tests {
Expand Down