Skip to content

Commit 4a0888a

Browse files
committed
Update resource-path
Signed-off-by: hueifeng <695979933@qq.com>
1 parent 68647bc commit 4a0888a

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

cmd/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ dapr run --app-id myapp --app-port 3000 --app-protocol grpc -- go run main.go
114114
Protocol: protocol,
115115
PlacementHostAddr: viper.GetString("placement-host-address"),
116116
ComponentsPath: componentsPath,
117+
ResourcesPath: resourcesPath,
117118
AppSSL: appSSL,
118119
MetricsPort: metricsPort,
119120
MaxRequestBodySize: maxRequestBodySize,
120121
HTTPReadBufferSize: readBufferSize,
121122
UnixDomainSocket: unixDomainSocket,
122123
EnableAPILogging: enableAPILogging,
123-
ResourcesPath: resourcesPath,
124124
})
125125
if err != nil {
126126
print.FailureStatusEvent(os.Stderr, err.Error())

pkg/standalone/run.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (config *RunConfig) validate() error {
127127
return err
128128
}
129129

130-
if DefaultComponentsDirPath() == config.ComponentsPath {
130+
if DefaultComponentsDirPath() != config.ResourcesPath {
131131
config.ComponentsPath = ""
132132
}
133133

@@ -226,7 +226,6 @@ func newDaprMeta() (*DaprMeta, error) {
226226
func (config *RunConfig) getArgs() []string {
227227
args := []string{}
228228

229-
fmt.Printf("哈哈: %s\n", config.ResourcesPath)
230229
schema := reflect.ValueOf(*config)
231230
for i := 0; i < schema.NumField(); i++ {
232231
valueField := schema.Field(i).Interface()
@@ -261,7 +260,6 @@ func (config *RunConfig) getArgs() []string {
261260
if print.IsJSONLogEnabled() {
262261
args = append(args, "--log-as-json")
263262
}
264-
fmt.Println(args)
265263
return args
266264
}
267265

pkg/standalone/run_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func assertCommonArgs(t *testing.T, basicConfig *RunConfig, output *RunOutput) {
9191
assertArgumentEqual(t, "metrics-port", "9001", output.DaprCMD.Args)
9292
assertArgumentEqual(t, "dapr-http-max-request-size", "-1", output.DaprCMD.Args)
9393
assertArgumentEqual(t, "dapr-http-read-buffer-size", "-1", output.DaprCMD.Args)
94-
assertArgumentEqual(t, "spec-resources-path", DefaultComponentsDirPath(), output.DaprCMD.Args)
94+
assertArgumentEqual(t, "resources-path", DefaultComponentsDirPath(), output.DaprCMD.Args)
9595
}
9696

9797
func assertAppEnv(t *testing.T, config *RunConfig, output *RunOutput) {
@@ -147,7 +147,7 @@ func TestRun(t *testing.T) {
147147
ProfilePort: 9090,
148148
Protocol: "http",
149149
ComponentsPath: DefaultComponentsDirPath(),
150-
SpecResourcesPath: DefaultComponentsDirPath(),
150+
ResourcesPath: DefaultComponentsDirPath(),
151151
AppSSL: true,
152152
MetricsPort: 9001,
153153
MaxRequestBodySize: -1,

0 commit comments

Comments
 (0)