Skip to content

Commit 1213e69

Browse files
authored
chore: assert that PluginSpec is implemented (#344)
## Issue Related to validator-labs/validatorctl#178 ## Description Asserts that the PluginSpec interface is implemented
1 parent c89dd21 commit 1213e69

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

api/v1alpha1/vspherevalidator_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55

66
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
77

8+
"github.com/validator-labs/validator/pkg/plugins"
89
"github.com/validator-labs/validator/pkg/validationrule"
910

1011
"github.com/validator-labs/validator-plugin-vsphere/pkg/constants"
@@ -22,6 +23,8 @@ type VsphereValidatorSpec struct {
2223
NTPValidationRules []NTPValidationRule `json:"ntpValidationRules,omitempty" yaml:"ntpValidationRules,omitempty"`
2324
}
2425

26+
var _ plugins.PluginSpec = (*VsphereValidatorSpec)(nil)
27+
2528
// PluginCode returns the vSphere validator's plugin code.
2629
func (s VsphereValidatorSpec) PluginCode() string {
2730
return constants.PluginCode

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/pkg/errors v0.9.1
1212
github.com/sirupsen/logrus v1.9.3
1313
github.com/stretchr/testify v1.9.0
14-
github.com/validator-labs/validator v0.1.7
14+
github.com/validator-labs/validator v0.1.8
1515
github.com/vmware/govmomi v0.42.0
1616
golang.org/x/exp v0.0.0-20240822175202-778ce7bba035
1717
k8s.io/api v0.31.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
158158
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
159159
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
160160
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
161-
github.com/validator-labs/validator v0.1.7 h1:x1iBKoecChM52G7bbacMsdIQYvB84C65DRIex8TG6vQ=
162-
github.com/validator-labs/validator v0.1.7/go.mod h1:ssEvc9ws3kwWJ2VpIsOtgm7WmA6bdux2kkuIHbgT6oU=
161+
github.com/validator-labs/validator v0.1.8 h1:4PRcnQ92Knao7V0hm704DYQMi0+nNjbS/PgMRCDH2iU=
162+
github.com/validator-labs/validator v0.1.8/go.mod h1:+8vtI1GlihPKm0Jp61D50KPgkJkFmLZNc5fqh415DuQ=
163163
github.com/vmware/govmomi v0.42.0 h1:MbvAlVfjNBE1mHMaQ7yOSop1KLB0/93x6VAGuCtjqtI=
164164
github.com/vmware/govmomi v0.42.0/go.mod h1:1H5LWwsBif8HKZqbFp0FdoKTHyJE4FzL6ACequMKYQg=
165165
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=

0 commit comments

Comments
 (0)