Skip to content

Commit

Permalink
Generate empty test using /gen-test ChatOpts command (#2005)
Browse files Browse the repository at this point in the history
* 🤖 Add automatically generated tests

Signed-off-by: Vdaas CI <[email protected]>

* test changes on unimplemented test

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

* 🤖 Add automatically generated tests

Signed-off-by: Vdaas CI <[email protected]>

* 🤖 Add automatically generated tests

Signed-off-by: Vdaas CI <[email protected]>

* remove and fix failed test

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

* 🤖 Update license headers / Format go codes and yaml files

Signed-off-by: Vdaas CI <[email protected]>

* format

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

* 🤖 Update license headers / Format go codes and yaml files

Signed-off-by: Vdaas CI <[email protected]>

* 💚 fix chatops yaml

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

* Revert "🤖 Update license headers / Format go codes and yaml files"

This reverts commit c94211c.

* Revert ":green_heart: fix chatops yaml"

This reverts commit 359bd31.

* Update .github/workflows/chatops.yml

* fix

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

* fix

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

---------

Signed-off-by: Vdaas CI <[email protected]>
Signed-off-by: kevindiu <[email protected]>
Signed-off-by: kpango <[email protected]>
Signed-off-by: vankichi <[email protected]>
Co-authored-by: Vdaas CI <[email protected]>
Co-authored-by: kpango <[email protected]>
Co-authored-by: vankichi <[email protected]>
  • Loading branch information
4 people authored Apr 13, 2023
1 parent e8d40c4 commit e86bd80
Show file tree
Hide file tree
Showing 351 changed files with 144,296 additions and 1 deletion.
78 changes: 78 additions & 0 deletions cmd/agent/core/ngt/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,81 @@

// Package main provides program main
package main

import (
"testing"

"github.com/vdaas/vald/internal/test/goleak"
)

// 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)
}
})
}
}
78 changes: 78 additions & 0 deletions cmd/agent/sidecar/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,81 @@

// Package main provides program main
package main

import (
"testing"

"github.com/vdaas/vald/internal/test/goleak"
)

// 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)
}
})
}
}
78 changes: 78 additions & 0 deletions cmd/discoverer/k8s/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,81 @@

// Package main provides program main
package main

import (
"testing"

"github.com/vdaas/vald/internal/test/goleak"
)

// 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)
}
})
}
}
78 changes: 78 additions & 0 deletions cmd/gateway/filter/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,81 @@

// Package main provides program main
package main

import (
"testing"

"github.com/vdaas/vald/internal/test/goleak"
)

// 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 e86bd80

Please sign in to comment.