e2e: reject unknown providers
This finishes the work started for 1.13: instead of merely warning about an unknown value given to --profile, the test/e2e/e2e.test binary will now print an error and refuse to run. Fixes: #70200
This commit is contained in:
@@ -45,6 +45,17 @@ func RegisterProvider(name string, factory Factory) {
|
||||
providers[name] = factory
|
||||
}
|
||||
|
||||
// GetProviders returns the names of all currently registered providers.
|
||||
func GetProviders() []string {
|
||||
mutex.Lock()
|
||||
defer mutex.Unlock()
|
||||
var providerNames []string
|
||||
for name := range providers {
|
||||
providerNames = append(providerNames, name)
|
||||
}
|
||||
return providerNames
|
||||
}
|
||||
|
||||
func init() {
|
||||
// "local" or "skeleton" can always be used.
|
||||
RegisterProvider("local", func() (ProviderInterface, error) {
|
||||
|
Reference in New Issue
Block a user