Enhancement for integration test helpers (#1223)
* Add option to run sidecar without app * Allow specifying custom components path Co-authored-by: Long Dai <long.dai@intel.com>
This commit is contained in:
parent
72754c6036
commit
53a04bc120
|
@ -52,6 +52,12 @@ func WithAppProtocol(protocol runtime.Protocol, port int) Option {
|
|||
}
|
||||
}
|
||||
|
||||
func WithoutApp() Option {
|
||||
return func(config *runtime.Config) {
|
||||
config.ApplicationPort = 0
|
||||
}
|
||||
}
|
||||
|
||||
func WithDaprHTTPPort(port int) Option {
|
||||
return func(config *runtime.Config) {
|
||||
config.HTTPPort = port
|
||||
|
@ -76,6 +82,12 @@ func WithListenAddresses(addresses []string) Option {
|
|||
}
|
||||
}
|
||||
|
||||
func WithComponentsPath(path string) Option {
|
||||
return func(config *runtime.Config) {
|
||||
config.Standalone.ComponentsPath = path
|
||||
}
|
||||
}
|
||||
|
||||
func NewRuntime(appID string, opts ...Option) (*runtime.DaprRuntime, error) {
|
||||
var err error
|
||||
|
||||
|
|
Loading…
Reference in New Issue