INNER CODE UNIT · Go

func

raystack/optimus · config/config_client_test.go:15

func (c *ClientConfigTestSuite) TestGetNamespaceByName() {
	c.Run("should return nil and error if name is not found", func() {
		namespaceName := "namespace1"
		clientConfig := &config.ClientConfig{}

		actualNamespace, actualErr := clientConfig.GetNamespaceByName(namespaceName)

		c.Nil(actualNamespace)
		c.Error(actualErr)
	})

	c.Run("should namespace and nil if namespace name is found", func() {
		namespaceName := "namespace1"
		clientConfig := &config.ClientConfig{
			Namespaces: []*config.Namespace{
				{
					Name: namespaceName,
				},

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…