update mod && fix links
This commit is contained in:
parent
40c1c59909
commit
5d75f1f7fc
116 changed files with 181 additions and 182 deletions
|
@ -10,7 +10,7 @@
|
|||
|
||||
Небольшие исправления на <10 строк проще всего послать через веб интерфейс гитлаба.
|
||||
|
||||
1. Откройте нужный файл в веб интерфейсе репозитория https://gitlab.com/manytask/itmo-go/private
|
||||
1. Откройте нужный файл в веб интерфейсе репозитория https://gitlab.com/manytask/itmo-go/public
|
||||
2. Нажмите на кнопку "Edit". Во всплывающей подсказке нажмите кнопку "Fork".
|
||||
![](docs/edit-and-fork.png)
|
||||
3. Внесите изменения в файл. Нажмите "Commit Changes" внизу страницы.
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
Для многофайловых исправлений можно сначала сделать исправление локально:
|
||||
|
||||
1. Создайте форк https://gitlab.com/manytask/itmo-go/private аналогично тому, что выше.
|
||||
1. Создайте форк https://gitlab.com/manytask/itmo-go/public аналогично тому, что выше.
|
||||
|
||||
2. Закоммитьте все локальные изменения, которые вы не хотите добавлять в репозиторий курса.
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Для работы с кодом нужен go 1.18 или выше.
|
||||
|
||||
```sh
|
||||
git clone https://gitlab.com/manytask/itmo-go/private.git
|
||||
git clone https://gitlab.com/manytask/itmo-go/public.git
|
||||
cd shad-go
|
||||
go test ./sum/...
|
||||
```
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
```
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
pkg: gitlab.com/manytask/itmo-go/private/allocs
|
||||
pkg: gitlab.com/manytask/itmo-go/public/allocs
|
||||
Benchmark/count-4 73200 16294 ns/op 880 B/op 5 allocs/op
|
||||
Benchmark/main-4 40485 30113 ns/op 1034 B/op 9 allocs/op
|
||||
```
|
||||
|
@ -23,7 +23,7 @@ Benchmark/main-4 40485 30113 ns/op 1034
|
|||
Значения бенчмарков для авторского решения:
|
||||
```goos: linux
|
||||
goarch: amd64
|
||||
pkg: gitlab.com/manytask/itmo-go/private/allocs
|
||||
pkg: gitlab.com/manytask/itmo-go/public/allocs
|
||||
Benchmark/count-4 212850 5471 ns/op 4144 B/op 2 allocs/op
|
||||
Benchmark/main-4 143937 8247 ns/op 4176 B/op 3 allocs/op
|
||||
```
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
package batcher
|
||||
|
||||
import "gitlab.com/manytask/itmo-go/private/batcher/slow"
|
||||
import "gitlab.com/manytask/itmo-go/public/batcher/slow"
|
||||
|
||||
type Batcher struct{}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/goleak"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/batcher/slow"
|
||||
"gitlab.com/manytask/itmo-go/public/batcher/slow"
|
||||
)
|
||||
|
||||
func TestSimple(t *testing.T) {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/blowfish"
|
||||
"gitlab.com/manytask/itmo-go/public/blowfish"
|
||||
)
|
||||
|
||||
var _ cipher.Block = (*blowfish.Blowfish)(nil)
|
||||
|
|
|
@ -35,7 +35,7 @@ Your pipeline #194613 has failed! // 194613 -- это ID pipeline'а
|
|||
// Далее идут последние 10 строк лога gitlab runner'а
|
||||
testtool: copying go.mod, go.sum and .golangci.yml
|
||||
testtool: running tests
|
||||
testtool: > go test -mod readonly -tags private -c -o /tmp/bincache730817117/5d83984f885e61c1 gitlab.com/manytask/itmo-go/private/sum
|
||||
testtool: > go test -mod readonly -tags private -c -o /tmp/bincache730817117/5d83984f885e61c1 gitlab.com/manytask/itmo-go/public/sum
|
||||
--- FAIL: TestSum (0.00s)
|
||||
sum_test.go:19: 2 + 2 == 0 != 4
|
||||
sum_test.go:19: 9223372036854775807 + 1 == 0 != -9223372036854775808
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
type testCase struct {
|
||||
|
@ -93,7 +93,7 @@ testtool: copying !change files
|
|||
testtool: copying testdata directory
|
||||
testtool: copying go.mod, go.sum and .golangci.yml
|
||||
testtool: running tests
|
||||
testtool: > go test -mod readonly -tags private -c -o /tmp/bincache730817117/5d83984f885e61c1 gitlab.com/manytask/itmo-go/private/sum
|
||||
testtool: > go test -mod readonly -tags private -c -o /tmp/bincache730817117/5d83984f885e61c1 gitlab.com/manytask/itmo-go/public/sum
|
||||
--- FAIL: TestSum (0.00s)
|
||||
sum_test.go:19: 2 + 2 == 0 != 4
|
||||
sum_test.go:19: 9223372036854775807 + 1 == 0 != -9223372036854775808
|
||||
|
@ -113,7 +113,7 @@ ERROR: Job failed: exit code 1`,
|
|||
Stage: test, Job grade
|
||||
testtool: copying go.mod, go.sum and .golangci.yml
|
||||
testtool: running tests
|
||||
testtool: > go test -mod readonly -tags private -c -o /tmp/bincache730817117/5d83984f885e61c1 gitlab.com/manytask/itmo-go/private/sum
|
||||
testtool: > go test -mod readonly -tags private -c -o /tmp/bincache730817117/5d83984f885e61c1 gitlab.com/manytask/itmo-go/public/sum
|
||||
--- FAIL: TestSum (0.00s)
|
||||
sum_test.go:19: 2 + 2 == 0 != 4
|
||||
sum_test.go:19: 9223372036854775807 + 1 == 0 != -9223372036854775808
|
||||
|
@ -156,7 +156,7 @@ testtool: copying !change files
|
|||
testtool: copying testdata directory
|
||||
testtool: copying go.mod, go.sum and .golangci.yml
|
||||
testtool: running tests
|
||||
testtool: > go test -mod readonly -tags private -c -o /tmp/bincache730817117/5d83984f885e61c1 gitlab.com/manytask/itmo-go/private/sum
|
||||
testtool: > go test -mod readonly -tags private -c -o /tmp/bincache730817117/5d83984f885e61c1 gitlab.com/manytask/itmo-go/public/sum
|
||||
--- FAIL: TestSum (0.00s)
|
||||
sum_test.go:19: 2 + 2 == 0 != 4
|
||||
sum_test.go:19: 9223372036854775807 + 1 == 0 != -9223372036854775808
|
||||
|
@ -188,7 +188,7 @@ ERROR: Job failed: exit code 1`,
|
|||
Stage: %v, Job %v
|
||||
testtool: copying go.mod, go.sum and .golangci.yml
|
||||
testtool: running tests
|
||||
testtool: > go test -mod readonly -tags private -c -o /tmp/bincache730817117/5d83984f885e61c1 gitlab.com/manytask/itmo-go/private/sum
|
||||
testtool: > go test -mod readonly -tags private -c -o /tmp/bincache730817117/5d83984f885e61c1 gitlab.com/manytask/itmo-go/public/sum
|
||||
--- FAIL: TestSum (0.00s)
|
||||
sum_test.go:19: 2 + 2 == 0 != 4
|
||||
sum_test.go:19: 9223372036854775807 + 1 == 0 != -9223372036854775808
|
||||
|
|
|
@ -12,8 +12,8 @@ import (
|
|||
"github.com/gorilla/handlers"
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/coverme/models"
|
||||
"gitlab.com/manytask/itmo-go/private/coverme/utils"
|
||||
"gitlab.com/manytask/itmo-go/public/coverme/models"
|
||||
"gitlab.com/manytask/itmo-go/public/coverme/utils"
|
||||
)
|
||||
|
||||
type App struct {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/coverme/models"
|
||||
"gitlab.com/manytask/itmo-go/public/coverme/models"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
|
|
|
@ -5,8 +5,8 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/coverme/app"
|
||||
"gitlab.com/manytask/itmo-go/private/coverme/models"
|
||||
"gitlab.com/manytask/itmo-go/public/coverme/app"
|
||||
"gitlab.com/manytask/itmo-go/public/coverme/models"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/goleak"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/pgfixture"
|
||||
"gitlab.com/manytask/itmo-go/public/pgfixture"
|
||||
)
|
||||
|
||||
func TestDao(t *testing.T) {
|
||||
|
|
|
@ -18,10 +18,10 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
const importPath = "gitlab.com/manytask/itmo-go/private/digitalclock"
|
||||
const importPath = "gitlab.com/manytask/itmo-go/public/digitalclock"
|
||||
|
||||
var binCache testtool.BinCache
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/goleak"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/api"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/artifact"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/client"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/dist"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/filecache"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/worker"
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/api"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/artifact"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/client"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/dist"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/filecache"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/worker"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package disttest
|
||||
|
||||
import (
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
type JobResult struct {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
var singleWorkerConfig = &Config{WorkerCount: 1}
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
var threeWorkerConfig = &Config{WorkerCount: 3}
|
||||
|
|
|
@ -3,7 +3,7 @@ package api
|
|||
import (
|
||||
"context"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
type BuildRequest struct {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
type BuildClient struct{}
|
||||
|
|
|
@ -12,9 +12,9 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/zap/zaptest"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/api"
|
||||
mock "gitlab.com/manytask/itmo-go/private/distbuild/pkg/api/mock"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/api"
|
||||
mock "gitlab.com/manytask/itmo-go/public/distbuild/pkg/api/mock"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
//go:generate mockgen -package mock -destination mock/mock.go . Service
|
||||
|
|
|
@ -3,7 +3,7 @@ package api
|
|||
import (
|
||||
"context"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
// JobResult описывает результат работы джоба.
|
||||
|
|
|
@ -11,9 +11,9 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/zap/zaptest"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/api"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/api/mock"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/api"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/api/mock"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
//go:generate mockgen -package mock -destination mock/heartbeat.go . HeartbeatService
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: gitlab.com/manytask/itmo-go/private/distbuild/pkg/api (interfaces: HeartbeatService)
|
||||
// Source: gitlab.com/manytask/itmo-go/public/distbuild/pkg/api (interfaces: HeartbeatService)
|
||||
|
||||
// Package mock is a generated GoMock package.
|
||||
package mock
|
||||
|
@ -7,7 +7,7 @@ package mock
|
|||
import (
|
||||
context "context"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
api "gitlab.com/manytask/itmo-go/private/distbuild/pkg/api"
|
||||
api "gitlab.com/manytask/itmo-go/public/distbuild/pkg/api"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: gitlab.com/manytask/itmo-go/private/distbuild/pkg/api (interfaces: Service)
|
||||
// Source: gitlab.com/manytask/itmo-go/public/distbuild/pkg/api (interfaces: Service)
|
||||
|
||||
// Package mock is a generated GoMock package.
|
||||
package mock
|
||||
|
@ -7,8 +7,8 @@ package mock
|
|||
import (
|
||||
context "context"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
api "gitlab.com/manytask/itmo-go/private/distbuild/pkg/api"
|
||||
build "gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
api "gitlab.com/manytask/itmo-go/public/distbuild/pkg/api"
|
||||
build "gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"path/filepath"
|
||||
"sync"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/artifact"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/artifact"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
type testCache struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ package artifact
|
|||
import (
|
||||
"context"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
// Download artifact from remote cache into local cache.
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/zap/zaptest"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/artifact"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/artifact"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
func TestArtifactTransfer(t *testing.T) {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
type Client struct{}
|
||||
|
|
4
distbuild/pkg/dist/coordinator.go
vendored
4
distbuild/pkg/dist/coordinator.go
vendored
|
@ -8,8 +8,8 @@ import (
|
|||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/filecache"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/scheduler"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/filecache"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/scheduler"
|
||||
)
|
||||
|
||||
type Coordinator struct{}
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
type Client struct{}
|
||||
|
|
|
@ -14,8 +14,8 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/zap/zaptest"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/filecache"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/filecache"
|
||||
)
|
||||
|
||||
type env struct {
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/artifact"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/artifact"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/filecache"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/filecache"
|
||||
)
|
||||
|
||||
type testCache struct {
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/api"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/api"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
)
|
||||
|
||||
var TimeAfter = time.After
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/tarstream"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/tarstream"
|
||||
)
|
||||
|
||||
func TestTarStream(t *testing.T) {
|
||||
|
|
|
@ -8,9 +8,9 @@ import (
|
|||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/api"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/artifact"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/filecache"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/api"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/artifact"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/filecache"
|
||||
)
|
||||
|
||||
type Worker struct{}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
✗ go test -v -run=^$ -bench=BenchmarkSprintf -memprofile=mem.out ./varfmt/...
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
pkg: gitlab.com/manytask/itmo-go/private/varfmt
|
||||
pkg: gitlab.com/manytask/itmo-go/public/varfmt
|
||||
cpu: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
|
||||
BenchmarkSprintf
|
||||
BenchmarkSprintf/small
|
||||
|
@ -17,7 +17,7 @@ BenchmarkSprintf/small_string-8 13282659 84.48 ns/op 16 B/op
|
|||
BenchmarkSprintf/big
|
||||
BenchmarkSprintf/big-8 20089 62372 ns/op 16388 B/op 1 allocs/op
|
||||
PASS
|
||||
ok gitlab.com/manytask/itmo-go/private/varfmt 4.363s
|
||||
ok gitlab.com/manytask/itmo-go/public/varfmt 4.363s
|
||||
```
|
||||
|
||||
Сэмплы профайлера будут записаны в бинарный файл `mem.out`.
|
||||
|
@ -53,7 +53,7 @@ Showing nodes accounting for 715.73MB, 99.37% of 720.23MB total
|
|||
Dropped 24 nodes (cum <= 3.60MB)
|
||||
flat flat% sum% cum cum%
|
||||
715.73MB 99.37% 99.37% 716.73MB 99.51% fmt.Sprintf
|
||||
0 0% 99.37% 716.73MB 99.51% gitlab.com/manytask/itmo-go/private/varfmt.BenchmarkSprintf.func1
|
||||
0 0% 99.37% 716.73MB 99.51% gitlab.com/manytask/itmo-go/public/varfmt.BenchmarkSprintf.func1
|
||||
0 0% 99.37% 716.73MB 99.51% testing.(*B).launch
|
||||
0 0% 99.37% 716.73MB 99.51% testing.(*B).runN
|
||||
(pprof)
|
||||
|
|
|
@ -63,8 +63,8 @@ import (
|
|||
"flag"
|
||||
"log"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/gitfame/configs"
|
||||
"gitlab.com/manytask/itmo-go/private/gitfame/internal"
|
||||
"gitlab.com/manytask/itmo-go/public/gitfame/configs"
|
||||
"gitlab.com/manytask/itmo-go/public/gitfame/internal"
|
||||
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
|
@ -81,8 +81,8 @@ import (
|
|||
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/gitfame/configs"
|
||||
"gitlab.com/manytask/itmo-go/private/gitfame/internal"
|
||||
"gitlab.com/manytask/itmo-go/public/gitfame/configs"
|
||||
"gitlab.com/manytask/itmo-go/public/gitfame/internal"
|
||||
)
|
||||
```
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
func TestMerge(t *testing.T) {
|
||||
|
|
|
@ -17,10 +17,10 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
const fetchallImportPath = "gitlab.com/manytask/itmo-go/private/fetchall"
|
||||
const fetchallImportPath = "gitlab.com/manytask/itmo-go/public/fetchall"
|
||||
|
||||
var binCache testtool.BinCache
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/fileleak"
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/fileleak"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
type fakeT struct {
|
||||
|
|
|
@ -15,10 +15,10 @@ import (
|
|||
"github.com/go-resty/resty/v2"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
const importPath = "gitlab.com/manytask/itmo-go/private/firewall/cmd/firewall"
|
||||
const importPath = "gitlab.com/manytask/itmo-go/public/firewall/cmd/firewall"
|
||||
|
||||
var binCache testtool.BinCache
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/goleak"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/genericsum"
|
||||
"gitlab.com/manytask/itmo-go/public/genericsum"
|
||||
)
|
||||
|
||||
func TestMin(t *testing.T) {
|
||||
|
|
|
@ -14,10 +14,10 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
const importPath = "gitlab.com/manytask/itmo-go/private/gitfame/cmd/gitfame"
|
||||
const importPath = "gitlab.com/manytask/itmo-go/public/gitfame/cmd/gitfame"
|
||||
|
||||
var binCache testtool.BinCache
|
||||
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.18
|
||||
|
||||
|
|
|
@ -5,8 +5,7 @@ package gossip
|
|||
import (
|
||||
"time"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/gossip/meshpb"
|
||||
"google.golang.org/grpc"
|
||||
"gitlab.com/manytask/itmo-go/public/gossip/meshpb"
|
||||
)
|
||||
|
||||
type PeerConfig struct {
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"gitlab.com/manytask/itmo-go/private/gossip"
|
||||
"gitlab.com/manytask/itmo-go/private/gossip/meshpb"
|
||||
"gitlab.com/manytask/itmo-go/public/gossip"
|
||||
"gitlab.com/manytask/itmo-go/public/gossip/meshpb"
|
||||
"go.uber.org/goleak"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "gitlab.com/manytask/itmo-go/private/gossip/meshpb";
|
||||
option go_package = "gitlab.com/manytask/itmo-go/public/gossip/meshpb";
|
||||
|
||||
// PeerMeta is arbitrary message that is propagated with peer gossip.
|
||||
message PeerMeta {
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
```
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
pkg: gitlab.com/manytask/itmo-go/private/gzep
|
||||
pkg: gitlab.com/manytask/itmo-go/public/gzep
|
||||
cpu: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
|
||||
BenchmarkEncodeSimple
|
||||
BenchmarkEncodeSimple-8 7047 176628 ns/op 813872 B/op 17 allocs/op
|
||||
BenchmarkEncode
|
||||
BenchmarkEncode-8 41706 32616 ns/op 19 B/op 0 allocs/op
|
||||
PASS
|
||||
ok gitlab.com/manytask/itmo-go/private/gzep 3.625s
|
||||
ok gitlab.com/manytask/itmo-go/public/gzep 3.625s
|
||||
```
|
||||
|
||||
### С чего начать?
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/gzep"
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/gzep"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
func BenchmarkEncode(b *testing.B) {
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/illegal"
|
||||
"gitlab.com/manytask/itmo-go/private/illegal/internal"
|
||||
"gitlab.com/manytask/itmo-go/public/illegal"
|
||||
"gitlab.com/manytask/itmo-go/public/illegal/internal"
|
||||
)
|
||||
|
||||
func TestIllegalField(t *testing.T) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/illegal"
|
||||
"gitlab.com/manytask/itmo-go/public/illegal"
|
||||
)
|
||||
|
||||
func TestStringFromBytes(t *testing.T) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/iprange"
|
||||
"gitlab.com/manytask/itmo-go/public/iprange"
|
||||
)
|
||||
|
||||
func ExampleParseList() {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/goleak"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/keylock"
|
||||
"gitlab.com/manytask/itmo-go/public/keylock"
|
||||
)
|
||||
|
||||
func timeout(d time.Duration) <-chan struct{} {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* Ссылки
|
||||
|
||||
.link https://wiki.yandex.ru/shad/groups/2018/Semester4/GoLang/ Вики страница
|
||||
.link https://gitlab.com/manytask/itmo-go/private Репозиторий
|
||||
.link https://gitlab.com/manytask/itmo-go/public Репозиторий
|
||||
.link https://t.me/joinchat/BjrYSxdPJGtJdd1pae08Zg Чат курса в телеграме
|
||||
[[https://p.go.manytask.org]] - эти слайды.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: gitlab.com/manytask/itmo-go/private/lectures/04-testing/gomock (interfaces: Foo)
|
||||
// Source: gitlab.com/manytask/itmo-go/public/lectures/04-testing/gomock (interfaces: Foo)
|
||||
|
||||
// Package example is a generated GoMock package.
|
||||
package example
|
||||
|
|
|
@ -285,7 +285,7 @@ Good example
|
|||
go test -cover
|
||||
PASS
|
||||
coverage: 42.9% of statements
|
||||
ok gitlab.com/manytask/itmo-go/private/lectures/04-testing/size 0.001s
|
||||
ok gitlab.com/manytask/itmo-go/public/lectures/04-testing/size 0.001s
|
||||
|
||||
* Coverage
|
||||
|
||||
|
@ -543,13 +543,13 @@ Good example
|
|||
==================
|
||||
WARNING: DATA RACE
|
||||
Read at 0x00c000092090 by goroutine 8:
|
||||
gitlab.com/manytask/itmo-go/private/lectures/04-testing/race.TestRace()
|
||||
gitlab.com/manytask/itmo-go/public/lectures/04-testing/race.TestRace()
|
||||
/home/prime/Code/shad-go/lectures/04-testing/race/race_test.go:25 +0x144
|
||||
testing.tRunner()
|
||||
/usr/local/go/src/testing/testing.go:909 +0x199
|
||||
|
||||
Previous write at 0x00c000092090 by goroutine 9:
|
||||
gitlab.com/manytask/itmo-go/private/lectures/04-testing/race.TestRace.func1()
|
||||
gitlab.com/manytask/itmo-go/public/lectures/04-testing/race.TestRace.func1()
|
||||
/home/prime/Code/shad-go/lectures/04-testing/race/race_test.go:17 +0x6c
|
||||
|
||||
...
|
||||
|
@ -557,7 +557,7 @@ Good example
|
|||
--- FAIL: TestRace (0.00s)
|
||||
testing.go:853: race detected during execution of test
|
||||
FAIL
|
||||
FAIL gitlab.com/manytask/itmo-go/private/lectures/04-testing/race 0.007s
|
||||
FAIL gitlab.com/manytask/itmo-go/public/lectures/04-testing/race 0.007s
|
||||
|
||||
* White box testing
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private/lectures
|
||||
module gitlab.com/manytask/itmo-go/public/lectures
|
||||
|
||||
go 1.20
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/goleak"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/ledger"
|
||||
"gitlab.com/manytask/itmo-go/private/pgfixture"
|
||||
"gitlab.com/manytask/itmo-go/public/ledger"
|
||||
"gitlab.com/manytask/itmo-go/public/pgfixture"
|
||||
)
|
||||
|
||||
func TestLedger(t *testing.T) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gitlab.com/manytask/itmo-go/private/middleware/auth"
|
||||
"gitlab.com/manytask/itmo-go/public/middleware/auth"
|
||||
)
|
||||
|
||||
type fakeChecker map[string]struct {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/stretchr/testify/require"
|
||||
"gitlab.com/manytask/itmo-go/private/middleware/httpgauge"
|
||||
"gitlab.com/manytask/itmo-go/public/middleware/httpgauge"
|
||||
)
|
||||
|
||||
func TestMiddleware(t *testing.T) {
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zaptest/observer"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/middleware/requestlog"
|
||||
"gitlab.com/manytask/itmo-go/public/middleware/requestlog"
|
||||
)
|
||||
|
||||
func TestRequestLog(t *testing.T) {
|
||||
|
|
|
@ -16,10 +16,10 @@ import (
|
|||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
const importPath = "gitlab.com/manytask/itmo-go/private/olympics"
|
||||
const importPath = "gitlab.com/manytask/itmo-go/public/olympics"
|
||||
|
||||
var binCache testtool.BinCache
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
func lookPath(t *testing.T, name string) string {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/jackc/pgx/v4"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/pgfixture"
|
||||
"gitlab.com/manytask/itmo-go/public/pgfixture"
|
||||
)
|
||||
|
||||
func TestLocalPostgres(t *testing.T) {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: gitlab.com/manytask/itmo-go/private/retryupdate/kvapi (interfaces: Client)
|
||||
// Source: gitlab.com/manytask/itmo-go/public/retryupdate/kvapi (interfaces: Client)
|
||||
|
||||
// Package retryupdate_test is a generated GoMock package.
|
||||
package retryupdate_test
|
||||
|
||||
import (
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
kvapi "gitlab.com/manytask/itmo-go/private/retryupdate/kvapi"
|
||||
kvapi "gitlab.com/manytask/itmo-go/public/retryupdate/kvapi"
|
||||
reflect "reflect"
|
||||
)
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
package retryupdate
|
||||
|
||||
import "gitlab.com/manytask/itmo-go/private/retryupdate/kvapi"
|
||||
import "gitlab.com/manytask/itmo-go/public/retryupdate/kvapi"
|
||||
|
||||
func UpdateValue(c kvapi.Client, key string, updateFn func(oldValue *string) (newValue string, err error)) error {
|
||||
panic("implement me")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package retryupdate_test
|
||||
|
||||
//go:generate mockgen -destination mock_test.go -package retryupdate_test gitlab.com/manytask/itmo-go/private/retryupdate/kvapi Client
|
||||
//go:generate mockgen -destination mock_test.go -package retryupdate_test gitlab.com/manytask/itmo-go/public/retryupdate/kvapi Client
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
@ -11,8 +11,8 @@ import (
|
|||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/retryupdate"
|
||||
"gitlab.com/manytask/itmo-go/private/retryupdate/kvapi"
|
||||
"gitlab.com/manytask/itmo-go/public/retryupdate"
|
||||
"gitlab.com/manytask/itmo-go/public/retryupdate/kvapi"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/go-redis/redis/v8"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
type testingTB interface {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/stretchr/testify/require"
|
||||
"go.uber.org/goleak"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/shopfront"
|
||||
"gitlab.com/manytask/itmo-go/public/shopfront"
|
||||
)
|
||||
|
||||
func TestShopfront(t *testing.T) {
|
||||
|
|
|
@ -11,9 +11,9 @@ import (
|
|||
"go.uber.org/goleak"
|
||||
"go.uber.org/zap/zaptest"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/api"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/private/distbuild/pkg/scheduler"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/api"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/build"
|
||||
"gitlab.com/manytask/itmo-go/public/distbuild/pkg/scheduler"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
```
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
pkg: gitlab.com/manytask/itmo-go/private/structtags
|
||||
pkg: gitlab.com/manytask/itmo-go/public/structtags
|
||||
cpu: Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz
|
||||
BenchmarkUnpacker/user-4 4158832 268.2 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkUnpacker/good-4 1000000 1198 ns/op 220 B/op 6 allocs/op
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
В этой задаче вам нужно научиться сдавать решения в тестовую систему.
|
||||
|
||||
0. Склонируйте этот репозиторий с https://gitlab.com/manytask/itmo-go/private
|
||||
0. Склонируйте этот репозиторий с https://gitlab.com/manytask/itmo-go/public
|
||||
|
||||
1. Откройте файл `sum.go` и реализуйте функцию сложения двух чисел.
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
```shell
|
||||
# Если вы еще не зарегистрировались в тестовой системе, сделайте это сейчас.
|
||||
# Перейдите по ссылке My Repo на https://go.manytask.org/
|
||||
# Перейдите по ссылке My Repo на https://itmo-go.manytask.org/
|
||||
# Нажмите на синюю кнопку clone и скопируйте адрес и "Clone with SSH"
|
||||
# Выполните в консоли команду, заменив последний аргумент на ваш адрес
|
||||
git remote add student git@gitlab.manytask.org:go-spring-2023/USERNAME.git
|
||||
|
@ -51,6 +51,6 @@
|
|||
Если вы хотите перезапустить тестирование в коммите, вы можете нажать на кнопку Retry на странице
|
||||
с логом тестирования, или сделать новый коммит с незначительными изменениями и запушить его.
|
||||
|
||||
8. Посмотрите как проходит тестирование, пройдя по ссылке Submits со страницы https://go.manytask.org/
|
||||
8. Посмотрите как проходит тестирование, пройдя по ссылке Submits со страницы https://itmo-go.manytask.org/
|
||||
|
||||
9. Убедитесь, что ваша оценка появилась в [таблице](https://docs.google.com/spreadsheets/d/1rTqdHu2AJtdCeFp_iLKsKVk848Wddh2rW0nOmO6Y528).
|
||||
|
|
|
@ -6,6 +6,6 @@ RUN cd /opt/shad && go mod download
|
|||
|
||||
COPY .gitlab-ci.yml /opt/shad/.grader-ci.yml
|
||||
|
||||
RUN cd /opt/shad && go install gitlab.com/manytask/itmo-go/private/tools/testtool/cmd/testtool
|
||||
RUN cd /opt/shad && go install gitlab.com/manytask/itmo-go/public/tools/testtool/cmd/testtool
|
||||
|
||||
RUN find /opt/shad -type f -iname '*.go' -not -path '*/testdata/*' | xargs chmod o-rwx
|
||||
|
|
|
@ -27,7 +27,7 @@ func TestMath(t *testing.T) {
|
|||
actual : 2
|
||||
message : 1 == 2
|
||||
FAIL
|
||||
FAIL gitlab.com/manytask/itmo-go/private/testequal 0.003s
|
||||
FAIL gitlab.com/manytask/itmo-go/public/testequal 0.003s
|
||||
FAIL
|
||||
```
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool/commands"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool/commands"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -39,13 +39,13 @@ func TestListPackages(t *testing.T) {
|
|||
binaries, tests := listTestsAndBinaries("../testdata/pkgfind/task", []string{"-tags", "private"})
|
||||
|
||||
assert.Equal(t, binaries, map[string]struct{}{
|
||||
"gitlab.com/manytask/itmo-go/private/task/cmd/tool": {},
|
||||
"gitlab.com/manytask/itmo-go/private/task/cmd/tool_with_test": {},
|
||||
"gitlab.com/manytask/itmo-go/public/task/cmd/tool": {},
|
||||
"gitlab.com/manytask/itmo-go/public/task/cmd/tool_with_test": {},
|
||||
})
|
||||
|
||||
assert.Equal(t, tests, map[string]struct{}{
|
||||
"gitlab.com/manytask/itmo-go/private/task/cmd/tool_with_test": {},
|
||||
"gitlab.com/manytask/itmo-go/private/task/pkg/a": {},
|
||||
"gitlab.com/manytask/itmo-go/private/task/pkg/c": {},
|
||||
"gitlab.com/manytask/itmo-go/public/task/cmd/tool_with_test": {},
|
||||
"gitlab.com/manytask/itmo-go/public/task/pkg/a": {},
|
||||
"gitlab.com/manytask/itmo-go/public/task/pkg/c": {},
|
||||
})
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
var testingToken = ""
|
||||
|
||||
const reportEndpoint = "https://go.manytask.org/api/report"
|
||||
const reportEndpoint = "https://itmo-go.manytask.org/api/report"
|
||||
|
||||
func reportTestResults(token string, task string, userID string, failed bool) error {
|
||||
form := url.Values{}
|
||||
|
|
|
@ -17,7 +17,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"golang.org/x/perf/benchstat"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/tools/testtool"
|
||||
"gitlab.com/manytask/itmo-go/public/tools/testtool"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -26,7 +26,7 @@ const (
|
|||
privateRepoFlag = "private-repo"
|
||||
|
||||
testdataDir = "testdata"
|
||||
moduleImportPath = "gitlab.com/manytask/itmo-go/private"
|
||||
moduleImportPath = "gitlab.com/manytask/itmo-go/public"
|
||||
)
|
||||
|
||||
var testSubmissionCmd = &cobra.Command{
|
||||
|
|
2
tools/testtool/testdata/list/go.mod
vendored
2
tools/testtool/testdata/list/go.mod
vendored
|
@ -1,3 +1,3 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
|
2
tools/testtool/testdata/pkgfind/go.mod
vendored
2
tools/testtool/testdata/pkgfind/go.mod
vendored
|
@ -1,3 +1,3 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/coverme"
|
||||
"gitlab.com/manytask/itmo-go/public/coverme"
|
||||
)
|
||||
|
||||
// min coverage: .,subpkg 70%
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"gitlab.com/manytask/itmo-go/private/coverme"
|
||||
"gitlab.com/manytask/itmo-go/public/coverme"
|
||||
)
|
||||
|
||||
// min coverage: .,subpkg 70%
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
package sum
|
||||
|
||||
import "gitlab.com/manytask/itmo-go/private/sum/pkg"
|
||||
import "gitlab.com/manytask/itmo-go/public/sum/pkg"
|
||||
|
||||
func Sum(a, b int64) int64 {
|
||||
pkg.F()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module gitlab.com/manytask/itmo-go/private
|
||||
module gitlab.com/manytask/itmo-go/public
|
||||
|
||||
go 1.16
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue