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

Bump up Golang version #85

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
env:
GO111MODULE: on
TARGET: amd64

strategy:
# max-parallel: 2
matrix:
go-version: [1.13.x]
go-version: [1.13.x, 1.17.x]
os: [ubuntu-18.04, ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -24,22 +24,22 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout project

- name: Checkout project
uses: actions/checkout@v2

- name: Clone API project
run: go get github.com/sodafoundation/api

- name: Install Pre-requisites
run: sudo apt-get update && sudo apt-get install -y git make curl wget libltdl7 libseccomp2 libffi-dev gawk build-essential gcc librados-dev librbd-dev

- name: Build
# Build SODA Dock source code
run: make all
run: make all

- name: Run CI scripts for Testing
run: ./install/CI/coverage && ./install/CI/test

- name: After success run Codecov Coverage tool.
run: bash <(curl -s https://codecov.io/bash)
31 changes: 28 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/sodafoundation/dock

go 1.12
go 1.17

require (
github.com/LINBIT/godrbdutils v0.0.0-20180425110027-65b98a0f103a
Expand Down Expand Up @@ -41,9 +41,7 @@ require (
github.com/spf13/cobra v0.0.3
github.com/stretchr/testify v1.4.0
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
github.com/ugorji/go v1.1.7 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.3 // indirect
go.uber.org/zap v1.12.0 // indirect
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f // indirect
Expand All @@ -55,3 +53,30 @@ require (
gopkg.in/yaml.v2 v2.2.4
k8s.io/api v0.17.0 // indirect
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 // indirect
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/google/gofuzz v1.0.0 // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/reflectwalk v1.0.0 // indirect
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae // indirect
github.com/philhofer/fwd v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 // indirect
github.com/sirupsen/logrus v1.4.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.1.1 // indirect
github.com/tinylib/msgp v1.1.0 // indirect
github.com/ugorji/go/codec v1.1.7 // indirect
github.com/willf/bitset v1.1.10 // indirect
golang.org/x/text v0.3.2 // indirect
google.golang.org/protobuf v1.22.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/apimachinery v0.17.0 // indirect
k8s.io/klog v1.0.0 // indirect
)
36 changes: 2 additions & 34 deletions go.sum

Large diffs are not rendered by default.

13 changes: 5 additions & 8 deletions pkg/utils/daemon/daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,30 @@ func TestDaemon(t *testing.T) {
copy(bakArgs, os.Args)

t1 := []string{"testcase1", "-daemon"}
osArgsHelper(t, t1...)
osArgsHelper(t1...)
CheckAndRunDaemon(true)
check(t, t1[0])

t2 := []string{"testcase2", "-daemon=true"}
osArgsHelper(t, t2...)
osArgsHelper(t2...)
CheckAndRunDaemon(true)
check(t, t2[0])

t3 := []string{"testcase3", "-daemon=false"}
osArgsHelper(t, t3...)
osArgsHelper(t3...)
CheckAndRunDaemon(false)
check(t)

t4 := []string{"testcase3", "daemon"}
osArgsHelper(t, t4...)
osArgsHelper(t4...)
CheckAndRunDaemon(true)
check(t, t4...)

os.Remove(testFile)
os.Args = bakArgs
}

func osArgsHelper(t *testing.T, s ...string) {
func osArgsHelper(s ...string) {
cs := []string{os.Args[0], "-test.run=TestHelperProcess", "--"}
os.Args = append(cs, s...)
}
Expand Down Expand Up @@ -95,7 +95,6 @@ func writeToTestFile(t *testing.T, s string) {
}

func TestHelperProcess(t *testing.T) {
defer os.Exit(0)
args := os.Args
for len(args) > 0 {
if args[0] == "--" {
Expand All @@ -106,8 +105,6 @@ func TestHelperProcess(t *testing.T) {
}
if len(args) == 0 {
fmt.Fprint(os.Stderr, "No command\n")
os.Exit(0)
}

writeToTestFile(t, strings.Join(args, " "))
}
13 changes: 0 additions & 13 deletions vendor/github.com/LINBIT/godrbdutils/LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions vendor/github.com/LINBIT/godrbdutils/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions vendor/github.com/LINBIT/godrbdutils/action_string.go

This file was deleted.

16 changes: 0 additions & 16 deletions vendor/github.com/LINBIT/godrbdutils/cmd_string.go

This file was deleted.

152 changes: 0 additions & 152 deletions vendor/github.com/LINBIT/godrbdutils/drbdutils.go

This file was deleted.

Loading