Add kafka jobs to DMaaP Mediator Producer
[nonrtric.git] / dmaap-mediator-producer / internal / config / registrator_test.go
index 2cffa2c..d1b61d8 100644 (file)
@@ -40,7 +40,8 @@ func TestRegisterTypes(t *testing.T) {
        }, nil)
 
        type1 := TypeDefinition{
-               Id: "Type1",
+               Identity:   "Type1",
+               TypeSchema: `{"type": "object","properties": {},"additionalProperties": false}`,
        }
        types := []TypeDefinition{type1}
 
@@ -57,7 +58,7 @@ func TestRegisterTypes(t *testing.T) {
        assertions.Equal("http", actualRequest.URL.Scheme)
        assertions.Equal("localhost:9990", actualRequest.URL.Host)
        assertions.Equal("/data-producer/v1/info-types/Type1", actualRequest.URL.Path)
-       assertions.Equal("application/json; charset=utf-8", actualRequest.Header.Get("Content-Type"))
+       assertions.Equal("application/json", actualRequest.Header.Get("Content-Type"))
        body, _ := ioutil.ReadAll(actualRequest.Body)
        expectedBody := []byte(`{"info_job_data_schema": {"type": "object","properties": {},"additionalProperties": false}}`)
        assertions.Equal(expectedBody, body)
@@ -92,7 +93,7 @@ func TestRegisterProducer(t *testing.T) {
        assertions.Equal("http", actualRequest.URL.Scheme)
        assertions.Equal("localhost:9990", actualRequest.URL.Host)
        assertions.Equal("/data-producer/v1/info-producers/Producer1", actualRequest.URL.Path)
-       assertions.Equal("application/json; charset=utf-8", actualRequest.Header.Get("Content-Type"))
+       assertions.Equal("application/json", actualRequest.Header.Get("Content-Type"))
        body, _ := ioutil.ReadAll(actualRequest.Body)
        expectedBody := []byte(`{"info_producer_supervision_callback_url":"supervisionCallbackUrl","supported_info_types":["type1"],"info_job_callback_url":"jobCallbackUrl"}`)
        assertions.Equal(expectedBody, body)