Closed dheerajng closed 4 years ago
Awesome. Can you add a test for desiredstateapi
Added unit test. Snippet of log below.
=== RUN TestDesiredStateServicegroupAPI
2020/01/25 08:53:24 [TRACE] go-nitro: Resourcejson is {"servicegroup":{"autoscale":"API","servicegroupname":"test_sg_umoBQ","servicetype":"http"}}
2020/01/25 08:53:24 [DEBUG] go-nitro: Creating resource of type servicegroup
2020/01/25 08:53:24 [TRACE] go-nitro: url is http://10.106.162.111/nitro/v1/config/servicegroup?idempotent=yes
2020/01/25 08:53:24 [DEBUG] go-nitro: response Status: 201 Created
2020/01/25 08:53:24 [TRACE] go-nitro: Resourcejson is {"servicegroup_servicegroupmemberlist_binding":{"servicegroupname":"test_sg_umoBQ","members":[{"ip":"1.1.1.1","port":80},{"ip":"2.2.2.2","port":80},{"ip":"3.3.3.3","port":80}]}}
2020/01/25 08:53:24 [DEBUG] go-nitro: Creating resource of type servicegroup_servicegroupmemberlist_binding
2020/01/25 08:53:24 [TRACE] go-nitro: url is http://10.106.162.111/nitro/v1/config/servicegroup_servicegroupmemberlist_binding
2020/01/25 08:53:24 [DEBUG] go-nitro: response Status: 201 Created
--- PASS: TestDesiredStateServicegroupAPI (0.08s)
jsonconfig and config directories are updated to support Nitro of v13.0-47.22. A file 'servicegroup_servicegroupmemberlist_binding.go' is manually created which deals with the desiredState API support.