@@ -34,8 +34,7 @@ public void testComponentToYaml() {
34
34
assertFalse (kvstore .getMetadata ().isEmpty ());
35
35
36
36
String componentYaml = converter .convert (kvstore );
37
- String expectedComponentYaml =
38
- "apiVersion: dapr.io/v1alpha1\n "
37
+ String expectedComponentYaml = "apiVersion: dapr.io/v1alpha1\n "
39
38
+ "kind: Component\n "
40
39
+ "metadata:\n "
41
40
+ " name: statestore\n "
@@ -58,11 +57,11 @@ public void testComponentWithInLineStringToYaml() {
58
57
"alias" ,
59
58
"middleware.http.routeralias" ,
60
59
"v1" ,
61
- Map .of ("routes" , "{\n " +
62
- " \" /mall/activity/info\" : \" /v1.0/invoke/srv.default/method/mall/activity/info\" ,\n " +
63
- " \" /hello/activity/{id}/info\" : \" /v1.0/invoke/srv.default/method/hello/activity/info\" ,\n " + //
64
- " \" /hello/activity/{id}/user\" : \" /v1.0/invoke/srv.default/method/hello/activity/user\" \n " + //
65
- "}" )))
60
+ Map .of ("routes" , "{\n " +
61
+ " \" /mall/activity/info\" : \" /v1.0/invoke/srv.default/method/mall/activity/info\" ,\n " +
62
+ " \" /hello/activity/{id}/info\" : \" /v1.0/invoke/srv.default/method/hello/activity/info\" ,\n " + //
63
+ " \" /hello/activity/{id}/user\" : \" /v1.0/invoke/srv.default/method/hello/activity/user\" \n " + //
64
+ "}" )))
66
65
.withAppChannelAddress ("host.testcontainers.internal" );
67
66
68
67
Set <Component > components = dapr .getComponents ();
@@ -72,8 +71,7 @@ public void testComponentWithInLineStringToYaml() {
72
71
assertFalse (kvstore .getMetadata ().isEmpty ());
73
72
74
73
String componentYaml = converter .convert (kvstore );
75
- String expectedComponentYaml =
76
- "apiVersion: dapr.io/v1alpha1\n "
74
+ String expectedComponentYaml = "apiVersion: dapr.io/v1alpha1\n "
77
75
+ "kind: Component\n "
78
76
+ "metadata:\n "
79
77
+ " name: alias\n "
@@ -83,10 +81,10 @@ public void testComponentWithInLineStringToYaml() {
83
81
+ " metadata:\n "
84
82
+ " - name: routes\n "
85
83
+ " value: |-\n "
86
- + " {\n "
84
+ + " {\n "
87
85
+ " \" /mall/activity/info\" : \" /v1.0/invoke/srv.default/method/mall/activity/info\" ,\n "
88
86
+ " \" /hello/activity/{id}/info\" : \" /v1.0/invoke/srv.default/method/hello/activity/info\" ,\n "
89
- + " \" /hello/activity/{id}/user\" : \" /v1.0/invoke/srv.default/method/hello/activity/user\" \n "
87
+ + " \" /hello/activity/{id}/user\" : \" /v1.0/invoke/srv.default/method/hello/activity/user\" \n "
90
88
+ " }\n " ;
91
89
92
90
assertEquals (expectedComponentYaml , componentYaml );
0 commit comments