Skip to content

Commit

Permalink
update dependencies (#2260)
Browse files Browse the repository at this point in the history
* update dependencies

Signed-off-by: kpango <[email protected]>

* re-generate test

Signed-off-by: kpango <[email protected]>

* fix test generation for main package

Signed-off-by: kpango <[email protected]>

---------

Signed-off-by: kpango <[email protected]>
  • Loading branch information
kpango authored and kmrmt committed Dec 12, 2023
1 parent 67ce131 commit 6410c2d
Show file tree
Hide file tree
Showing 30 changed files with 2,694 additions and 265 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ assignees: ""

<!--- Please change the versions below along with your environment -->

- Go Version: 1.21.4
- Go Version: 1.21.5
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.4
- NGT Version: 2.1.5
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/security_issue_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ assignees: ""

<!--- Please change the versions below along with your environment -->

- Go Version: 1.21.4
- Go Version: 1.21.5
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.4
- NGT Version: 2.1.5
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!--- Please change the versions below along with your environment -->

- Go Version: 1.21.4
- Go Version: 1.21.5
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.4
- NGT Version: 2.1.5
Expand Down
3 changes: 3 additions & 0 deletions Makefile.d/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ test/create-empty:
echo "Creating empty test file $$f"; \
package="$$(dirname $$f)" ; \
package="$$(basename $$package)" ; \
if [ "$$(basename $$f)" = "main.go" ]; then \
package="main"; \
fi; \
echo "package $$package" >> "$$f"; \
fi; \
done
Expand Down
87 changes: 87 additions & 0 deletions cmd/index/job/correction/main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// Copyright (C) 2019-2023 vdaas.org vald team <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main

// NOT IMPLEMENTED BELOW
//
// func Test_main(t *testing.T) {
// type want struct {
// }
// type test struct {
// name string
// want want
// checkFunc func(want) error
// beforeFunc func(*testing.T)
// afterFunc func(*testing.T)
// }
// defaultCheckFunc := func(w want) error {
// return nil
// }
// tests := []test{
// // TODO test cases
// /*
// {
// name: "test_case_1",
// want: want{},
// checkFunc: defaultCheckFunc,
// beforeFunc: func(t *testing.T,) {
// t.Helper()
// },
// afterFunc: func(t *testing.T,) {
// t.Helper()
// },
// },
// */
//
// // TODO test cases
// /*
// func() test {
// return test {
// name: "test_case_2",
// want: want{},
// checkFunc: defaultCheckFunc,
// beforeFunc: func(t *testing.T,) {
// t.Helper()
// },
// afterFunc: func(t *testing.T,) {
// t.Helper()
// },
// }
// }(),
// */
// }
//
// for _, tc := range tests {
// test := tc
// t.Run(test.name, func(tt *testing.T) {
// tt.Parallel()
// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent())
// if test.beforeFunc != nil {
// test.beforeFunc(tt)
// }
// if test.afterFunc != nil {
// defer test.afterFunc(tt)
// }
// checkFunc := test.checkFunc
// if test.checkFunc == nil {
// checkFunc = defaultCheckFunc
// }
//
// main()
// if err := checkFunc(test.want); err != nil {
// tt.Errorf("error = %v", err)
// }
// })
// }
// }
87 changes: 87 additions & 0 deletions cmd/index/job/creation/main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// Copyright (C) 2019-2023 vdaas.org vald team <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main

// NOT IMPLEMENTED BELOW
//
// func Test_main(t *testing.T) {
// type want struct {
// }
// type test struct {
// name string
// want want
// checkFunc func(want) error
// beforeFunc func(*testing.T)
// afterFunc func(*testing.T)
// }
// defaultCheckFunc := func(w want) error {
// return nil
// }
// tests := []test{
// // TODO test cases
// /*
// {
// name: "test_case_1",
// want: want{},
// checkFunc: defaultCheckFunc,
// beforeFunc: func(t *testing.T,) {
// t.Helper()
// },
// afterFunc: func(t *testing.T,) {
// t.Helper()
// },
// },
// */
//
// // TODO test cases
// /*
// func() test {
// return test {
// name: "test_case_2",
// want: want{},
// checkFunc: defaultCheckFunc,
// beforeFunc: func(t *testing.T,) {
// t.Helper()
// },
// afterFunc: func(t *testing.T,) {
// t.Helper()
// },
// }
// }(),
// */
// }
//
// for _, tc := range tests {
// test := tc
// t.Run(test.name, func(tt *testing.T) {
// tt.Parallel()
// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent())
// if test.beforeFunc != nil {
// test.beforeFunc(tt)
// }
// if test.afterFunc != nil {
// defer test.afterFunc(tt)
// }
// checkFunc := test.checkFunc
// if test.checkFunc == nil {
// checkFunc = defaultCheckFunc
// }
//
// main()
// if err := checkFunc(test.want); err != nil {
// tt.Errorf("error = %v", err)
// }
// })
// }
// }
87 changes: 87 additions & 0 deletions cmd/index/job/readreplica/rotate/main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// Copyright (C) 2019-2023 vdaas.org vald team <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main

// NOT IMPLEMENTED BELOW
//
// func Test_main(t *testing.T) {
// type want struct {
// }
// type test struct {
// name string
// want want
// checkFunc func(want) error
// beforeFunc func(*testing.T)
// afterFunc func(*testing.T)
// }
// defaultCheckFunc := func(w want) error {
// return nil
// }
// tests := []test{
// // TODO test cases
// /*
// {
// name: "test_case_1",
// want: want{},
// checkFunc: defaultCheckFunc,
// beforeFunc: func(t *testing.T,) {
// t.Helper()
// },
// afterFunc: func(t *testing.T,) {
// t.Helper()
// },
// },
// */
//
// // TODO test cases
// /*
// func() test {
// return test {
// name: "test_case_2",
// want: want{},
// checkFunc: defaultCheckFunc,
// beforeFunc: func(t *testing.T,) {
// t.Helper()
// },
// afterFunc: func(t *testing.T,) {
// t.Helper()
// },
// }
// }(),
// */
// }
//
// for _, tc := range tests {
// test := tc
// t.Run(test.name, func(tt *testing.T) {
// tt.Parallel()
// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent())
// if test.beforeFunc != nil {
// test.beforeFunc(tt)
// }
// if test.afterFunc != nil {
// defer test.afterFunc(tt)
// }
// checkFunc := test.checkFunc
// if test.checkFunc == nil {
// checkFunc = defaultCheckFunc
// }
//
// main()
// if err := checkFunc(test.want); err != nil {
// tt.Errorf("error = %v", err)
// }
// })
// }
// }
87 changes: 87 additions & 0 deletions cmd/index/job/save/main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// Copyright (C) 2019-2023 vdaas.org vald team <[email protected]>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// You may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main

// NOT IMPLEMENTED BELOW
//
// func Test_main(t *testing.T) {
// type want struct {
// }
// type test struct {
// name string
// want want
// checkFunc func(want) error
// beforeFunc func(*testing.T)
// afterFunc func(*testing.T)
// }
// defaultCheckFunc := func(w want) error {
// return nil
// }
// tests := []test{
// // TODO test cases
// /*
// {
// name: "test_case_1",
// want: want{},
// checkFunc: defaultCheckFunc,
// beforeFunc: func(t *testing.T,) {
// t.Helper()
// },
// afterFunc: func(t *testing.T,) {
// t.Helper()
// },
// },
// */
//
// // TODO test cases
// /*
// func() test {
// return test {
// name: "test_case_2",
// want: want{},
// checkFunc: defaultCheckFunc,
// beforeFunc: func(t *testing.T,) {
// t.Helper()
// },
// afterFunc: func(t *testing.T,) {
// t.Helper()
// },
// }
// }(),
// */
// }
//
// for _, tc := range tests {
// test := tc
// t.Run(test.name, func(tt *testing.T) {
// tt.Parallel()
// defer goleak.VerifyNone(tt, goleak.IgnoreCurrent())
// if test.beforeFunc != nil {
// test.beforeFunc(tt)
// }
// if test.afterFunc != nil {
// defer test.afterFunc(tt)
// }
// checkFunc := test.checkFunc
// if test.checkFunc == nil {
// checkFunc = defaultCheckFunc
// }
//
// main()
// if err := checkFunc(test.want); err != nil {
// tt.Errorf("error = %v", err)
// }
// })
// }
// }
Loading

0 comments on commit 6410c2d

Please sign in to comment.