traas-stack / chaosmeta

A chaos engineering platform for supporting the complete fault drill lifecycle.
https://chaosmeta.gitbook.io/chaosmeta-cn
Apache License 2.0
318 stars 55 forks source link

Test failure: *mockselector.MockIAnalyzer does not implement selector.IAnalyzer (missing method GetContainer) #162

Open xhd2015 opened 6 months ago

xhd2015 commented 6 months ago

when running test of chaosmeta-inject-operator/pkg/scopehandler/pod/handler_test.go, as the following:

cd chaosmeta-inject-operator 
go test -v ./pkg/scopehandler/pod

Error output:

# github.com/traas-stack/chaosmeta/chaosmeta-inject-operator/pkg/scopehandler/pod [github.com/traas-stack/chaosmeta/chaosmeta-inject-operator/pkg/scopehandler/pod.test]
pkg/scopehandler/pod/handler_test.go:101:10: cannot use analyzerMock (variable of type *mockselector.MockIAnalyzer) as "github.com/traas-stack/chaosmeta/chaosmeta-inject-operator/pkg/selector".IAnalyzer value in return statement: *mockselector.MockIAnalyzer does not implement "github.com/traas-stack/chaosmeta/chaosmeta-inject-operator/pkg/selector".IAnalyzer (missing method GetContainer)
FAIL    github.com/traas-stack/chaosmeta/chaosmeta-inject-operator/pkg/scopehandler/pod [build failed]
FAIL