istio: istio.io/istio/security/pkg/nodeagent/test Index | Files | Directories

package test

import "istio.io/istio/security/pkg/nodeagent/test"

Index

Package Files

setup.go

func RotateCert Uses

func RotateCert(interval time.Duration)

RotateCert forces cert to rotate at a specified interval for testing. Setting this to 0 disables rotation.

func WriteDataToFile Uses

func WriteDataToFile(path string, content []byte) error

WriteDataToFile writes data into file

type Env Uses

type Env struct {
    ProxySetup           *istioEnv.TestSetup
    OutboundListenerPort int
    InboundListenerPort  int
    // SDS server
    SDSServer *sds.Server
    // CA server
    CAServer *caserver.CAServer
}

Env manages test setup and teardown.

func SetupTest Uses

func SetupTest(t *testing.T, testID uint16) *Env

SetupTest starts Envoy, SDS server, CA server and a dummy backend. The test allow HTTP request flow.

         CA server
             |
+--------SDS server--------+
|                          |

HTTP ->outbound ->outbound TLS <--mTLS-->inbound TLS ->inbound ->backend request listener cluster listener cluster

func (*Env) DumpPortMap Uses

func (e *Env) DumpPortMap(t *testing.T)

DumpPortMap dumps port allocation status outbound listener : ClientProxyPort inbound listener : ServerProxyPort test backend : BackendPort proxy admin : AdminPort SDS path : SDSPath

func (*Env) StartProxy Uses

func (e *Env) StartProxy(t *testing.T)

StartProxy starts proxy.

func (*Env) StartSDSServer Uses

func (e *Env) StartSDSServer(t *testing.T)

StartSDSServer starts SDS server

func (*Env) TearDown Uses

func (e *Env) TearDown()

TearDown tears down all components.

Directories

PathSynopsis
cert_rotation
csr_failure
empty_certchain
mock
success_sds

Package test imports 16 packages (graph). Updated 2021-01-27. Refresh now. Tools for package owners.