diff --git a/cli/provision.properties b/cli/provision.properties deleted file mode 100644 index b080c0f1..00000000 --- a/cli/provision.properties +++ /dev/null @@ -1,14 +0,0 @@ -spec=/app/simple_schema_demo-api.yaml -acl.enabled=true -sr.enabled=true -dry.run=true -bootstrap.server=broker1:9092 -username=admin -secret=nothing -schema.registry=http://schema-registry:8081 -schema.path=/app/1 -sr.api.key=admin -sr.api.secret=nothing - - - diff --git a/cli/resources/provision.properties b/cli/resources/provision.properties deleted file mode 100644 index fedecf3d..00000000 --- a/cli/resources/provision.properties +++ /dev/null @@ -1,8 +0,0 @@ -acl.enabled=true -sr.enabled=true -dry.run=true -bootstrap.server=broker1:9092 -schema.registry=http://schema-registry:8081 -spec=/app/simple_schema_demo-api.yaml -schema.path=/app/1 -username=admin \ No newline at end of file diff --git a/cli/resources/schema/simple.schema_demo._public.super_user_signed_up.avsc b/cli/resources/schema/simple.schema_demo._public.super_user_signed_up.avsc deleted file mode 100644 index 3cf31dfd..00000000 --- a/cli/resources/schema/simple.schema_demo._public.super_user_signed_up.avsc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "record", - "namespace": "simple.schema_demo._public.super_user_signed_up_value", - "name": "SuperUserSignedUp", - "fields": [ - {"name": "role", "type": "string"}, - {"name": "user", "type": "simple.schema_demo._public.user_signed_up_value.UserSignedUp", "subject": "simple.schema_demo._public.user_signed_up_value.UserSignedUp"} - ] -} \ No newline at end of file diff --git a/cli/resources/schema/simple.schema_demo._public.user_checkout.yml b/cli/resources/schema/simple.schema_demo._public.user_checkout.yml deleted file mode 100644 index 38e279ed..00000000 --- a/cli/resources/schema/simple.schema_demo._public.user_checkout.yml +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema":"http://json-schema.org/draft-07/schema#", - "title":"User Checkout", - "type":"object", - "additionalProperties":false, - "javaType":"simple.schema_demo._public.user_checkout_value.UserCheckout", - "properties":{ - "id":{ - "type":"integer" - }, - "name":{ - "oneOf":[ - { - "type":"null", - "title":"Not included" - }, - { - "type":"string" - } - ] - }, - "price":{ - "type":"integer" - }, - "systemDate":{ - "oneOf":[ - { - "type":"null", - "title":"Not included" - }, - { - "type":"string" - } - ] - } - }, - "required":[ - "id", - "price" - ] -} \ No newline at end of file diff --git a/cli/resources/schema/simple.schema_demo._public.user_info.proto b/cli/resources/schema/simple.schema_demo._public.user_info.proto deleted file mode 100644 index 948328ca..00000000 --- a/cli/resources/schema/simple.schema_demo._public.user_info.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package io.specmesh.kafka.schema; - -message UserInfo { - string fullName = 1; - string email = 2; - int32 age = 3; -} \ No newline at end of file diff --git a/cli/resources/schema/simple.schema_demo._public.user_signed_up.avsc b/cli/resources/schema/simple.schema_demo._public.user_signed_up.avsc deleted file mode 100644 index 73361bfc..00000000 --- a/cli/resources/schema/simple.schema_demo._public.user_signed_up.avsc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "record", - "namespace": "simple.schema_demo._public.user_signed_up_value", - "name": "UserSignedUp", - "fields": [ - {"name": "fullName", "type": "string"}, - {"name": "email", "type": "string"}, - {"name": "age", "type": "int"} - ] -} \ No newline at end of file diff --git a/cli/resources/schema/simple.schema_demo._public.user_signed_up_value.UserSignedUp.avsc b/cli/resources/schema/simple.schema_demo._public.user_signed_up_value.UserSignedUp.avsc deleted file mode 100644 index 73361bfc..00000000 --- a/cli/resources/schema/simple.schema_demo._public.user_signed_up_value.UserSignedUp.avsc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "type": "record", - "namespace": "simple.schema_demo._public.user_signed_up_value", - "name": "UserSignedUp", - "fields": [ - {"name": "fullName", "type": "string"}, - {"name": "email", "type": "string"}, - {"name": "age", "type": "int"} - ] -} \ No newline at end of file diff --git a/cli/resources/simple_schema_demo-api.yaml b/cli/resources/simple_schema_demo-api.yaml deleted file mode 100644 index df4574c9..00000000 --- a/cli/resources/simple_schema_demo-api.yaml +++ /dev/null @@ -1,120 +0,0 @@ -asyncapi: '2.4.0' -id: 'urn:simple.schema_demo' -info: - title: Streetlights API - version: '1.0.0' - description: | - The Smartylighting Streetlights API allows you - to remotely manage the city lights. - license: - name: Apache 2.0 - url: 'https://www.apache.org/licenses/LICENSE-2.0' -servers: - mosquitto: - url: mqtt://test.mosquitto.org - protocol: mqtt -channels: - # PRODUCER/OWNER build pipe will publish schema to SR - _public.user_signed_up: - # publish bindings to instruct topic configuration per environment - bindings: - kafka: - envs: - - staging - - prod - partitions: 3 - replicas: 1 - configs: - cleanup.policy: delete - retention.ms: 999000 - - publish: - summary: Inform about environmental lighting conditions for a particular streetlight. - description: Doing clever things - operationId: onLightMeasured - message: - bindings: - kafka: - key: - type: long - schemaIdLocation: "payload" - schemaFormat: "application/vnd.apache.avro+json;version=1.9.0" - contentType: "application/octet-stream" - payload: - $ref: "/schema/simple.schema_demo._public.user_signed_up.avsc" - - # PRODUCER/OWNER build pipe will publish schema to SR - _public.user_checkout: - # publish bindings to instruct topic configuration per environment - bindings: - kafka: - envs: - - staging - - prod - partitions: 3 - replicas: 1 - configs: - cleanup.policy: delete - - publish: - summary: User purchase confirmation - operationId: onUserCheckout - message: - bindings: - kafka: - key: - type: long - schemaIdLocation: "payload" - schemaFormat: "application/json;version=1.9.0" - contentType: "application/json" - payload: - $ref: "/schema/simple.schema_demo._public.user_checkout.yml" - - - # PRODUCER/OWNER build pipe will publish schema to SR - _public.user_info: - # publish bindings to instruct topic configuration per environment - bindings: - kafka: - envs: - - staging - - prod - partitions: 3 - replicas: 1 - configs: - cleanup.policy: delete - retention.ms: 999000 - - publish: - summary: User purchase confirmation - operationId: onUserCheckout - message: - bindings: - kafka: - key: - type: long - schemaIdLocation: "payload" - schemaFormat: "application/json;version=1.9.0" - contentType: "application/json" - payload: - $ref: "/schema/simple.schema_demo._public.user_info.proto" - # SUBSCRIBER WILL REQUEST SCHEMA from SR and CodeGen required classes. Header will be used for Id - london.hammersmith.transport._public.tube: - subscribe: - summary: Humans arriving in the borough - operationId: onTube - bindings: - kafka: - groupId: 'aConsumerGroupId' - message: - schemaFormat: "application/vnd.apache.avro+json;version=1.9.0" - contentType: "application/octet-stream" - bindings: - kafka: - schemaIdLocation: "header" - key: - type: string - payload: - # client should lookup this schema remotely from the schema registry - it is owned by the publisher - $ref: "london.hammersmith.transport._public.tube.passenger.avsc" - diff --git a/cli/resources/simple_spec_demo-api.yaml b/cli/resources/simple_spec_demo-api.yaml deleted file mode 100644 index d6b37597..00000000 --- a/cli/resources/simple_spec_demo-api.yaml +++ /dev/null @@ -1,116 +0,0 @@ -asyncapi: '2.5.0' -id: 'urn:simple.spec_demo' -info: - title: Simple Spec for CLI demo - version: '1.0.0' - description: | - A bunch of random topics and configs - license: - name: Apache 2.0 - url: 'https://www.apache.org/licenses/LICENSE-2.0' -servers: - test: - url: test.mykafkacluster.org:8092 - protocol: kafka-secure - description: Test broker - -channels: - _public.user_signed_up: - bindings: - kafka: - envs: - - staging - - prod - partitions: 3 - replicas: 1 - configs: - cleanup.policy: delete - - publish: - summary: Inform about signup - operationId: onSignup - message: - bindings: - kafka: - schemaIdLocation: "payload" - schemaFormat: "application/vnd.apache.avro+json;version=1.9.0" - contentType: "application/octet-stream" - payload: - $ref: "/schema/simple.schema_demo._public.user_signed_up.avsc" - - _private.user_checkout: - bindings: - kafka: - envs: - - staging - - prod - partitions: 3 - replicas: 1 - configs: - cleanup.policy: delete - retention.ms: 999000 - - publish: - summary: User purchase confirmation - operationId: onUserCheckout - message: - bindings: - kafka: - schemaIdLocation: "payload" - schemaFormat: "application/json;version=1.9.0" - contentType: "application/json" - payload: - $ref: "/schema/simple.schema_demo._public.user_checkout.yml" - - - _protected.purchased: - bindings: - kafka: - partitions: 3 - - publish: - summary: Humans purchasing food - note - restricting access to other domain principal - tags: [ - name: "grant-access:some.other.domain.root" - ] - message: - name: Food Item - tags: [ - name: "human", - name: "purchase" - ] - payload: - type: object - properties: - id: - type: integer - minimum: 0 - description: Id of the food - cost: - type: number - minimum: 0 - description: GBP cost of the food item - human_id: - type: integer - minimum: 0 - description: Id of the human purchasing the food - - # SUBSCRIBER WILL REQUEST SCHEMA from SR and CodeGen required classes. Header will be used for Id - london.hammersmith.transport._public.tube: - subscribe: - summary: Humans arriving in the borough - bindings: - kafka: - groupId: 'aConsumerGroupId' - message: - schemaFormat: "application/vnd.apache.avro+json;version=1.9.0" - contentType: "application/octet-stream" - bindings: - kafka: - schemaIdLocation: "header" - key: - type: string - payload: - # client should lookup this schema remotely from the schema registry - it is owned by the publisher - $ref: "london.hammersmith.transport._public.tube.passenger.avsc" - diff --git a/cli/src/test/java/io/specmesh/cli/ProvisionFunctionalTest.java b/cli/src/test/java/io/specmesh/cli/ProvisionFunctionalTest.java index dd9e936d..4c3f6b64 100644 --- a/cli/src/test/java/io/specmesh/cli/ProvisionFunctionalTest.java +++ b/cli/src/test/java/io/specmesh/cli/ProvisionFunctionalTest.java @@ -82,7 +82,7 @@ void shouldProvisionTopicsAndAclResourcesWithSchemas() throws Exception { + " --secret admin-secret" + " --schema-registry " + KAFKA_ENV.schemaRegistryServer() - + " --schema-path ./resources" + + " --schema-path ./src/test/resources" + " -Dsome.property=testOne" + " -Dsome.other.property=testTwo") .split(" ")); diff --git a/cli/src/test/java/io/specmesh/cli/ProvisionNestedFunctionalTest.java b/cli/src/test/java/io/specmesh/cli/ProvisionNestedFunctionalTest.java index 1b99e3b6..6842d221 100644 --- a/cli/src/test/java/io/specmesh/cli/ProvisionNestedFunctionalTest.java +++ b/cli/src/test/java/io/specmesh/cli/ProvisionNestedFunctionalTest.java @@ -56,7 +56,7 @@ void shouldProvisionTopicsAndAclResourcesWithNestedSchemasAndRepublishCorrectly( + " --secret admin-secret" + " --schema-registry " + KAFKA_ENV.schemaRegistryServer() - + " --schema-path ./resources") + + " --schema-path ./src/test/resources") .split(" ")); // When: diff --git a/cli/src/test/java/io/specmesh/cli/StorageConsumptionFunctionalTest.java b/cli/src/test/java/io/specmesh/cli/StorageConsumptionFunctionalTest.java index fd81b919..d752036a 100644 --- a/cli/src/test/java/io/specmesh/cli/StorageConsumptionFunctionalTest.java +++ b/cli/src/test/java/io/specmesh/cli/StorageConsumptionFunctionalTest.java @@ -66,7 +66,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; import picocli.CommandLine; -import simple.schema_demo._public.user_signed_up_value.UserSignedUp; +import simple.schema_demo._public.UserSignedUp; @SuppressFBWarnings({"UW_UNCOND_WAIT", "WA_NOT_IN_LOOP"}) class StorageConsumptionFunctionalTest { @@ -90,7 +90,7 @@ void shouldGetStorageAndConsumptionMetrics() throws Exception { Provisioner.builder() .apiSpec(API_SPEC) - .schemaPath("./build/resources/test") + .schemaPath("./src/test/resources") .adminClient(KAFKA_ENV.adminClient()) .closeAdminClient(true) .schemaRegistryClient(KAFKA_ENV.srClient()) diff --git a/cli/src/test/java/simple/schema_demo/_public/user_signed_up_value/UserSignedUp.java b/cli/src/test/java/simple/schema_demo/_public/UserSignedUp.java similarity index 93% rename from cli/src/test/java/simple/schema_demo/_public/user_signed_up_value/UserSignedUp.java rename to cli/src/test/java/simple/schema_demo/_public/UserSignedUp.java index ff73f1cb..e552065a 100644 --- a/cli/src/test/java/simple/schema_demo/_public/user_signed_up_value/UserSignedUp.java +++ b/cli/src/test/java/simple/schema_demo/_public/UserSignedUp.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package simple.schema_demo._public.user_signed_up_value; +package simple.schema_demo._public; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/cli/src/test/java/simple/schema_demo/_public/user_checkout_value/UserCheckout.java b/cli/src/test/java/simple/schema_demo/_public/user_checkout_value/UserCheckout.java deleted file mode 100644 index 417215c9..00000000 --- a/cli/src/test/java/simple/schema_demo/_public/user_checkout_value/UserCheckout.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2023 SpecMesh Contributors (https://github.com/specmesh) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package simple.schema_demo._public.user_checkout_value; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaInject; -import com.kjetland.jackson.jsonSchema.annotations.JsonSchemaString; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@AllArgsConstructor -@NoArgsConstructor -@JsonSchemaInject( - strings = { - @JsonSchemaString( - path = "javaType", - value = "simple.schema_demo._public.user_checkout_value.UserCheckout") - }) -public class UserCheckout { - @JsonProperty long id; - @JsonProperty String name; - @JsonProperty int price; - @JsonProperty String systemDate; -} diff --git a/cli/src/test/resources/nested_schema_demo-api.yaml b/cli/src/test/resources/nested_schema_demo-api.yaml index 4613e007..89657068 100644 --- a/cli/src/test/resources/nested_schema_demo-api.yaml +++ b/cli/src/test/resources/nested_schema_demo-api.yaml @@ -37,7 +37,7 @@ channels: schemaFormat: "application/vnd.apache.avro+json;version=1.9.0" contentType: "application/octet-stream" payload: - $ref: "/schema/simple.schema_demo._public.user_signed_up.avsc" + $ref: "/schema/simple.schema_demo._public.UserSignedUp.avsc" _public.super_user_signed_up: # publish bindings to instruct topic configuration per environment @@ -63,4 +63,4 @@ channels: schemaFormat: "application/vnd.apache.avro+json;version=1.9.0" contentType: "application/octet-stream" payload: - $ref: "/schema/simple.schema_demo._public.super_user_signed_up.avsc" + $ref: "/schema/simple.schema_demo._public.SuperUserSignedUp.avsc" diff --git a/cli/src/test/resources/schema/simple.schema_demo._public.SuperUserSignedUp.avsc b/cli/src/test/resources/schema/simple.schema_demo._public.SuperUserSignedUp.avsc new file mode 100644 index 00000000..5c458f4c --- /dev/null +++ b/cli/src/test/resources/schema/simple.schema_demo._public.SuperUserSignedUp.avsc @@ -0,0 +1,9 @@ +{ + "type": "record", + "namespace": "simple.schema_demo._public", + "name": "SuperUserSignedUp", + "fields": [ + {"name": "role", "type": "string"}, + {"name": "user", "type": "simple.schema_demo._public.UserSignedUp", "subject": "simple.schema_demo._public.UserSignedUp"} + ] +} \ No newline at end of file diff --git a/cli/src/test/resources/schema/simple.schema_demo._public.user_signed_up.avsc b/cli/src/test/resources/schema/simple.schema_demo._public.UserSignedUp.avsc similarity index 74% rename from cli/src/test/resources/schema/simple.schema_demo._public.user_signed_up.avsc rename to cli/src/test/resources/schema/simple.schema_demo._public.UserSignedUp.avsc index 73361bfc..047ebd07 100644 --- a/cli/src/test/resources/schema/simple.schema_demo._public.user_signed_up.avsc +++ b/cli/src/test/resources/schema/simple.schema_demo._public.UserSignedUp.avsc @@ -1,6 +1,6 @@ { "type": "record", - "namespace": "simple.schema_demo._public.user_signed_up_value", + "namespace": "simple.schema_demo._public", "name": "UserSignedUp", "fields": [ {"name": "fullName", "type": "string"}, diff --git a/cli/src/test/resources/schema/simple.schema_demo._public.super_user_signed_up.avsc b/cli/src/test/resources/schema/simple.schema_demo._public.super_user_signed_up.avsc deleted file mode 100644 index 3cf31dfd..00000000 --- a/cli/src/test/resources/schema/simple.schema_demo._public.super_user_signed_up.avsc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "type": "record", - "namespace": "simple.schema_demo._public.super_user_signed_up_value", - "name": "SuperUserSignedUp", - "fields": [ - {"name": "role", "type": "string"}, - {"name": "user", "type": "simple.schema_demo._public.user_signed_up_value.UserSignedUp", "subject": "simple.schema_demo._public.user_signed_up_value.UserSignedUp"} - ] -} \ No newline at end of file diff --git a/cli/src/test/resources/simple_schema_demo-api.yaml b/cli/src/test/resources/simple_schema_demo-api.yaml index 5122e69c..11a09f56 100644 --- a/cli/src/test/resources/simple_schema_demo-api.yaml +++ b/cli/src/test/resources/simple_schema_demo-api.yaml @@ -39,7 +39,7 @@ channels: schemaFormat: "application/vnd.apache.avro+json;version=1.9.0" contentType: "application/octet-stream" payload: - $ref: "/schema/simple.schema_demo._public.user_signed_up.avsc" + $ref: "/schema/simple.schema_demo._public.UserSignedUp.avsc" # PRODUCER/OWNER build pipe will publish schema to SR _public.user_checkout: diff --git a/cli/src/test/resources/simple_spec_demo-api.yaml b/cli/src/test/resources/simple_spec_demo-api.yaml index 70e0b5ab..44d08195 100644 --- a/cli/src/test/resources/simple_spec_demo-api.yaml +++ b/cli/src/test/resources/simple_spec_demo-api.yaml @@ -36,7 +36,7 @@ channels: schemaFormat: "application/vnd.apache.avro+json;version=1.9.0" contentType: "application/octet-stream" payload: - $ref: "/schema/simple.schema_demo._public.user_signed_up.avsc" + $ref: "/schema/simple.schema_demo._public.UserSignedUp.avsc" _private/user_checkout: bindings: diff --git a/kafka/src/test/java/io/specmesh/kafka/ExporterFunctionalTest.java b/kafka/src/test/java/io/specmesh/kafka/ExporterFunctionalTest.java index 869a1823..e49477be 100644 --- a/kafka/src/test/java/io/specmesh/kafka/ExporterFunctionalTest.java +++ b/kafka/src/test/java/io/specmesh/kafka/ExporterFunctionalTest.java @@ -97,7 +97,7 @@ private enum Domain { static void setUp() { Provisioner.builder() .apiSpec(API_SPEC) - .schemaPath("./build/resources/test") + .schemaPath("./src/test/resources") .adminClient(KAFKA_ENV.adminClient()) .closeAdminClient(true) .srDisabled(true) diff --git a/kafka/src/test/java/io/specmesh/kafka/ProvisionerFreshStartFunctionalTest.java b/kafka/src/test/java/io/specmesh/kafka/ProvisionerFreshStartFunctionalTest.java index 72d7d411..820971d3 100644 --- a/kafka/src/test/java/io/specmesh/kafka/ProvisionerFreshStartFunctionalTest.java +++ b/kafka/src/test/java/io/specmesh/kafka/ProvisionerFreshStartFunctionalTest.java @@ -193,7 +193,7 @@ void shouldDryRunSchemasFromEmptyCluster() throws RestClientException, IOExcepti final var srClient = KAFKA_ENV.srClient(); final var changeset = SchemaProvisioner.provision( - true, false, API_SPEC, "./build/resources/test", srClient); + true, false, API_SPEC, "./src/test/resources", srClient); // Verify - 11 created assertThat( @@ -339,7 +339,7 @@ void shouldPublishSchemasFromEmptyCluster() throws RestClientException, IOExcept final var srClient = KAFKA_ENV.srClient(); final var changeset = SchemaProvisioner.provision( - false, false, API_SPEC, "./build/resources/test", srClient); + false, false, API_SPEC, "./src/test/resources", srClient); // Verify - 11 created assertThat( diff --git a/kafka/src/test/java/io/specmesh/kafka/admin/SimpleAdminClientTest.java b/kafka/src/test/java/io/specmesh/kafka/admin/SimpleAdminClientTest.java index 84ad205a..fcf7e4ec 100644 --- a/kafka/src/test/java/io/specmesh/kafka/admin/SimpleAdminClientTest.java +++ b/kafka/src/test/java/io/specmesh/kafka/admin/SimpleAdminClientTest.java @@ -73,7 +73,7 @@ void shouldRecordStats() throws ExecutionException, InterruptedException, Timeou Provisioner.builder() .apiSpec(API_SPEC) - .schemaPath("./build/resources/test") + .schemaPath("./src/test/resources") .adminClient(adminClient) .schemaRegistryClient(KAFKA_ENV.srClient()) .closeSchemaClient(true) diff --git a/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerFunctionalTest.java b/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerFunctionalTest.java index 8e735566..538ac3da 100644 --- a/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerFunctionalTest.java +++ b/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerFunctionalTest.java @@ -108,7 +108,7 @@ void shouldProvisionExistingSpec() throws Exception { // When: final Collection provisioned = SchemaProvisioner.provision( - false, false, API_SPEC, "./build/resources/test", srClient); + false, false, API_SPEC, "./src/test/resources", srClient); // Then: should have provisioned 3 schema: assertThat( @@ -133,7 +133,7 @@ void shouldPublishUpdatedSchemas() throws Exception { final Collection dryRunChangeset = SchemaProvisioner.provision( - true, false, API_UPDATE_SPEC, "./build/resources/test", srClient); + true, false, API_UPDATE_SPEC, "./src/test/resources", srClient); // Verify - the Update is proposed assertThat( @@ -150,7 +150,7 @@ void shouldPublishUpdatedSchemas() throws Exception { final Collection updateChangeset = SchemaProvisioner.provision( - false, false, API_UPDATE_SPEC, "./build/resources/test", srClient); + false, false, API_UPDATE_SPEC, "./src/test/resources", srClient); final var parsedSchemas = srClient.getSchemas(updateChangeset.iterator().next().subject(), false, true); @@ -207,7 +207,7 @@ void shouldRemoveUnspecdSchemas() throws RestClientException, IOException { private void testCleanUnSpecSchemas() throws IOException, RestClientException { final var cleanerSet2 = SchemaProvisioner.provision( - false, true, API_UPDATE_SPEC, "./build/resources/test", srClient); + false, true, API_UPDATE_SPEC, "./src/test/resources", srClient); // verify it was removed assertThat(cleanerSet2.iterator().next().state(), is(STATE.DELETED)); @@ -225,7 +225,7 @@ private void testDryRun(final String subject) throws IOException, RestClientExce // test dry run final var cleanerSet = SchemaProvisioner.provision( - true, true, API_UPDATE_SPEC, "./build/resources/test", srClient); + true, true, API_UPDATE_SPEC, "./src/test/resources", srClient); // verify dry run assertThat(cleanerSet, is(hasSize(1))); diff --git a/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerReferenceTest.java b/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerReferenceTest.java index 069c07f3..f749e661 100644 --- a/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerReferenceTest.java +++ b/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerReferenceTest.java @@ -64,7 +64,7 @@ void shouldProvisionSpecWithMissingRefToCurrency() { false, false, API_SPEC, - "./build/resources/test/schema-ref", + "./src/test/resources/schema-ref", KAFKA_ENV.srClient()); final var schemaState = provision.iterator().next(); @@ -83,7 +83,7 @@ void shouldProvisionSpecWithRefs() { false, false, COMMON_API_SPEC, - "./build/resources/test/schema-ref", + "./src/test/resources/schema-ref", KAFKA_ENV.srClient()); final var commonSchemaState = provisionCommon.iterator().next(); @@ -97,7 +97,7 @@ void shouldProvisionSpecWithRefs() { false, false, API_SPEC, - "./build/resources/test/schema-ref", + "./src/test/resources/schema-ref", KAFKA_ENV.srClient()); final var schemaState = provision.iterator().next(); diff --git a/kafka/src/test/java/io/specmesh/kafka/provision/schema/SchemaChangeSetCalculatorsTest.java b/kafka/src/test/java/io/specmesh/kafka/provision/schema/SchemaChangeSetCalculatorsTest.java index 713888ce..167675ee 100644 --- a/kafka/src/test/java/io/specmesh/kafka/provision/schema/SchemaChangeSetCalculatorsTest.java +++ b/kafka/src/test/java/io/specmesh/kafka/provision/schema/SchemaChangeSetCalculatorsTest.java @@ -79,6 +79,6 @@ void shouldOutputMessagesOnBorkedSchema() throws Exception { } private static Path filename(final String extra) { - return Path.of("./build/resources/test/schema/" + SCHEMA_FILENAME + extra); + return Path.of("./src/test/resources/schema/" + SCHEMA_FILENAME + extra); } }