redis: kubedb.dev/redis/test/e2e/framework Index | Files

package framework

import "kubedb.dev/redis/test/e2e/framework"

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The KubeDB Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Package Files

appbinding.go cluster.go crd.go database.go framework.go namespace.go pvc.go rbac.go redis.go util.go

Constants

const (
    GET            = "get"
    LIST           = "list"
    PATCH          = "patch"
    CREATE         = "create"
    UPDATE         = "update"
    USE            = "use"
    POLICY         = "policy"
    Role           = "Role"
    ServiceAccount = "ServiceAccount"
)

Variables

var (
    DockerRegistry = "kubedbci"
    DBCatalogName  = "4.0-v2"
    Cluster        = true
)

func AssertSlotsEqual Uses

func AssertSlotsEqual(slots, wanted []rd.ClusterSlot) error

func Sync Uses

func Sync(addrs [][]string, redis *api.Redis) ([][]RedisNode, [][]*rd.Client)

type ClusterScenario Uses

type ClusterScenario struct {
    Nodes   [][]RedisNode
    Clients [][]*rd.Client
}

func (*ClusterScenario) Addrs Uses

func (s *ClusterScenario) Addrs() []string

func (*ClusterScenario) ClusterClient Uses

func (s *ClusterScenario) ClusterClient(opt *rd.ClusterOptions) *rd.ClusterClient

func (*ClusterScenario) ClusterNodes Uses

func (s *ClusterScenario) ClusterNodes(slotStart, slotEnd int) []rd.ClusterNode

type Framework Uses

type Framework struct {
    StorageClass string
    // contains filtered or unexported fields
}

func New Uses

func New(
    restConfig *rest.Config,
    kubeClient kubernetes.Interface,
    extClient cs.Interface,
    kaClient ka.Interface,
    appCatalogClient appcat_cs.AppcatalogV1alpha1Interface,
    storageClass string,
) *Framework

func (*Framework) CheckAppBindingSpec Uses

func (f *Framework) CheckAppBindingSpec(meta metav1.ObjectMeta) error

func (*Framework) CleanRedis Uses

func (f *Framework) CleanRedis()

func (*Framework) CreateNamespace Uses

func (f *Framework) CreateNamespace() error

func (*Framework) CreateRedis Uses

func (f *Framework) CreateRedis(obj *api.Redis) error

func (*Framework) CreateRole Uses

func (f *Framework) CreateRole(obj *rbac.Role) error

func (*Framework) CreateRoleBinding Uses

func (f *Framework) CreateRoleBinding(obj *rbac.RoleBinding) error

func (*Framework) CreateServiceAccount Uses

func (f *Framework) CreateServiceAccount(obj *core.ServiceAccount) error

func (*Framework) DeleteNamespace Uses

func (f *Framework) DeleteNamespace() error

func (*Framework) DeleteRedis Uses

func (f *Framework) DeleteRedis(meta metav1.ObjectMeta) error

func (*Framework) EventuallyAppBinding Uses

func (f *Framework) EventuallyAppBinding(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyCRD Uses

func (f *Framework) EventuallyCRD() GomegaAsyncAssertion

func (*Framework) EventuallyGetItem Uses

func (f *Framework) EventuallyGetItem(meta metav1.ObjectMeta, key string) GomegaAsyncAssertion

func (*Framework) EventuallyPVCCount Uses

func (f *Framework) EventuallyPVCCount(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyRedis Uses

func (f *Framework) EventuallyRedis(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyRedisConfig Uses

func (f *Framework) EventuallyRedisConfig(meta metav1.ObjectMeta, config string) GomegaAsyncAssertion

func (*Framework) EventuallyRedisPhase Uses

func (f *Framework) EventuallyRedisPhase(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallyRedisRunning Uses

func (f *Framework) EventuallyRedisRunning(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EventuallySetItem Uses

func (f *Framework) EventuallySetItem(meta metav1.ObjectMeta, key, value string) GomegaAsyncAssertion

func (*Framework) EventuallyWipedOut Uses

func (f *Framework) EventuallyWipedOut(meta metav1.ObjectMeta) GomegaAsyncAssertion

func (*Framework) EvictPodsFromStatefulSet Uses

func (f *Framework) EvictPodsFromStatefulSet(meta metav1.ObjectMeta) error

func (*Framework) GetDatabasePod Uses

func (f *Framework) GetDatabasePod(meta metav1.ObjectMeta) (*core.Pod, error)

func (*Framework) GetPodsIPWithTunnel Uses

func (f *Framework) GetPodsIPWithTunnel(redis *api.Redis) ([][]string, [][]*portforward.Tunnel, error)

func (*Framework) GetRedis Uses

func (f *Framework) GetRedis(meta metav1.ObjectMeta) (*api.Redis, error)

func (*Framework) GetRedisClient Uses

func (f *Framework) GetRedisClient(meta metav1.ObjectMeta) (*redis.Client, error)

func (*Framework) Invoke Uses

func (f *Framework) Invoke() *Invocation

func (*Framework) Namespace Uses

func (f *Framework) Namespace() string

func (*Framework) PatchRedis Uses

func (f *Framework) PatchRedis(meta metav1.ObjectMeta, transform func(*api.Redis) *api.Redis) (*api.Redis, error)

func (*Framework) PrintDebugHelpers Uses

func (f *Framework) PrintDebugHelpers()

func (*Framework) RedisClusterOptions Uses

func (f *Framework) RedisClusterOptions() *rd.ClusterOptions

func (*Framework) WaitUntilRedisClusterConfigured Uses

func (f *Framework) WaitUntilRedisClusterConfigured(redis *api.Redis, port string) error

func (*Framework) WaitUntilStatefulSetReady Uses

func (f *Framework) WaitUntilStatefulSetReady(redis *api.Redis) error

type Invocation Uses

type Invocation struct {
    *Framework
    // contains filtered or unexported fields
}

func (*Invocation) CreateConfigMap Uses

func (fi *Invocation) CreateConfigMap(obj *core.ConfigMap) error

func (*Invocation) DeleteConfigMap Uses

func (fi *Invocation) DeleteConfigMap(meta metav1.ObjectMeta) error

func (*Invocation) ExtClient Uses

func (fi *Invocation) ExtClient() cs.Interface

func (*Invocation) GetCustomConfig Uses

func (fi *Invocation) GetCustomConfig(configs []string) *core.ConfigMap

func (*Invocation) GetPod Uses

func (fi *Invocation) GetPod(meta metav1.ObjectMeta) (*core.Pod, error)

func (*Invocation) Redis Uses

func (fi *Invocation) Redis() *api.Redis

func (*Invocation) RedisCluster Uses

func (fi *Invocation) RedisCluster() *api.Redis

func (*Invocation) RestConfig Uses

func (fi *Invocation) RestConfig() *rest.Config

func (*Invocation) RoleBinding Uses

func (fi *Invocation) RoleBinding(saName string, roleName string) *rbac.RoleBinding

func (*Invocation) RoleForElasticsearch Uses

func (fi *Invocation) RoleForElasticsearch(meta metav1.ObjectMeta) *rbac.Role

func (*Invocation) RoleForSnapshot Uses

func (fi *Invocation) RoleForSnapshot(meta metav1.ObjectMeta) *rbac.Role

func (*Invocation) ServiceAccount Uses

func (fi *Invocation) ServiceAccount() *core.ServiceAccount

type RedisNode Uses

type RedisNode struct {
    SlotStart []int
    SlotEnd   []int
    SlotsCnt  int

    ID       string
    IP       string
    Port     string
    Role     string
    Down     bool
    MasterID string

    Master *RedisNode
    Slaves []*RedisNode
}

Package framework imports 35 packages (graph). Updated 2020-06-02. Refresh now. Tools for package owners.