Example #1
0
func (s *poolSuite) TestListFilterInvalidProvidersAndNames(c *gc.C) {
	valid, err := apiserverstorage.IsValidPoolListFilter(
		s.api,
		params.StoragePoolFilter{
			Providers: []string{invalidProvider},
			Names:     []string{invalidName}})
	s.assertError(c, valid, err, ".*not supported.*")
}
Example #2
0
func (s *poolSuite) TestListFilterValidProvidersAndNames(c *gc.C) {
	s.registerProviders(c)
	valid, err := apiserverstorage.IsValidPoolListFilter(
		s.api,
		params.StoragePoolFilter{
			Providers: []string{validProvider},
			Names:     []string{validName}})
	s.assertNoError(c, valid, err)
}
Example #3
0
func (s *poolSuite) TestListFilterEmpty(c *gc.C) {
	valid, err := apiserverstorage.IsValidPoolListFilter(s.api, params.StoragePoolFilter{})
	s.assertNoError(c, valid, err)
}