Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAMEL-10013: Implemented test validating syntax of endpoint #3023

Closed
wants to merge 1 commit into from

Conversation

bedlaj
Copy link
Contributor

@bedlaj bedlaj commented Jul 7, 2019

I have implemented test which validates syntax of endpoints:

  1. Syntax starts with component name
  2. All syntax parts are defined as @UriPath
  3. All @UriPath marked as required are contained in syntax.

Now is this assertion wrapped in try-catch, so the problems are reported only to console.
I would like to confirm with you this approach and get some suggestions if there is some assertion missing. After that I can fix reported problems and remove try-catch to make this tests actually fail on invalid syntax.

Currently it reports following and all seems to be actual problems:

  • Component chatscript. Syntax chatscript:host:port/botname. Part botname is not defined as UriPath
  • Component google-bigquery. Syntax google-bigquery:projectId:datasetId:tableName. Part tableName is not defined as UriPath
  • Component google-bigquery-sql. Syntax google-bigquery-sql:query. Required param projectId is not defined in syntax
  • Component ipfs. Syntax ipfs:host:port/cmd. Part host is not defined as UriPath
  • Component pg-replication-slot. Syntax pg-replication-slot:host:port/database/slot:plugin. Part plugin is not defined as UriPath
  • Component soroush. Syntax soroush:action/authorizationToken. Part authorizationToken is not defined as UriPath
  • Component wordpress. Syntax wordpress:operationDetail. Required param operation is not defined in syntax

@oscerd
Copy link
Contributor

oscerd commented Jul 8, 2019

looks really good

@oscerd
Copy link
Contributor

oscerd commented Jul 8, 2019

I think it's a good approach to use a try-catch for the moment.

@bedlaj
Copy link
Contributor Author

bedlaj commented Jul 10, 2019

I have just started working on fixes of reported scheme problems. Is it OK to push this as part of this PR, or is someone working on merge already?

@oscerd
Copy link
Contributor

oscerd commented Jul 10, 2019

Go ahead on the PR branch please @bedlaj thanks

@bedlaj
Copy link
Contributor Author

bedlaj commented Jul 10, 2019

Done and squashed to one commit.

@oscerd
Copy link
Contributor

oscerd commented Jul 11, 2019

I'm merging this one too.

@oscerd
Copy link
Contributor

oscerd commented Jul 11, 2019

Merged on master. Thanks

@oscerd oscerd closed this Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants