Skip to content

Commit 53a04bc

Browse files
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>
1 parent 72754c6 commit 53a04bc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/certification/embedded/embedded.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ func WithAppProtocol(protocol runtime.Protocol, port int) Option {
5252
}
5353
}
5454

55+
func WithoutApp() Option {
56+
return func(config *runtime.Config) {
57+
config.ApplicationPort = 0
58+
}
59+
}
60+
5561
func WithDaprHTTPPort(port int) Option {
5662
return func(config *runtime.Config) {
5763
config.HTTPPort = port
@@ -76,6 +82,12 @@ func WithListenAddresses(addresses []string) Option {
7682
}
7783
}
7884

85+
func WithComponentsPath(path string) Option {
86+
return func(config *runtime.Config) {
87+
config.Standalone.ComponentsPath = path
88+
}
89+
}
90+
7991
func NewRuntime(appID string, opts ...Option) (*runtime.DaprRuntime, error) {
8092
var err error
8193

0 commit comments

Comments
 (0)