Skip to content

change type from int to float of the --cost-per-month and --setup-fee options - #162

Merged
eguzki merged 1 commit into
3scale:masterfrom
nmasse-itix:fix-issue-156
Jun 11, 2019
Merged

change type from int to float of the --cost-per-month and --setup-fee options#162
eguzki merged 1 commit into
3scale:masterfrom
nmasse-itix:fix-issue-156

Conversation

@nmasse-itix

Copy link
Copy Markdown
Contributor

This PR fixes #156

@eguzki

eguzki commented Jun 11, 2019

Copy link
Copy Markdown
Member

This is a change that can only be tested in integration tests. Sadly, currently, integration tests for app plan CRUD commands are technical debt.

@eguzki

eguzki commented Jun 11, 2019

Copy link
Copy Markdown
Member

@nmasse-itix travis CI tests did not report back. I cannot check because PR was done from forked repo.

Can you check results?

Sometimes tests pass and status report fails. We usually restart CI job and should be fixed.

@nmasse-itix

Copy link
Copy Markdown
Contributor Author

It seems I do not have the secrets to connect to the 3scale instance:
https://travis-ci.com/nmasse-itix/3scale_toolbox/jobs/206979216

@nmasse-itix

Copy link
Copy Markdown
Contributor Author

I ran the integration tests manually against my own 3scale instance (nmasse-redhat.3scale.net):

/usr/local/Cellar/ruby/2.6.3/bin/ruby -I/usr/local/lib/ruby/gems/2.6.0/gems/rspec-support-3.8.0/lib:/usr/local/lib/ruby/gems/2.6.0/gems/rspec-core-3.8.0/lib /usr/local/lib/ruby/gems/2.6.0/gems/rspec-core-3.8.0/exe/rspec --pattern spec/integration/\*\*/\*_spec.rb

Randomized with seed 28885
Error: Service service_sysname_gpqlnbak does not exist
.Service with id: 2555417807574 deleted
............Applied Service id: 2555417807581
.Applied Service id: 2555417807582
.Applied Service id: 2555417807584
..Applied ActiveDocs id: 128363
.Applied ActiveDocs id: 128364;Published
.Applied ActiveDocs id: 128365;Hidden
..Error: ActiveDocs activedocs_sysname_ckzpevri does not exist
.ActiveDocs with id: 128366 deleted
.......Service 'service_jgtpuvln' has been created with ID: 2555417807588
.Service 'service_owdvcpyu' has been created with ID: 2555417807589
.Error: Service has not been created. Errors: {"system_name"=>["has already been taken"]}
..Error: ActiveDocs has not been created. Errors: {"system_name"=>["has already been taken"]}
.ActiveDocs 'activedocs_dlxwpeti' has been created with ID: 128372
.ActiveDocs 'activedocs_uyhljsmx' has been created with ID: 128373
..........ID	NAME	STATE	SYSTEM_NAME	END_USER_REGISTRATION_REQUIRED	BACKEND_VERSION	DEPLOYMENT_OPTION	SUPPORT_EMAIL	DESCRIPTION	CREATED_AT	UPDATED_AT
Error: Service service_sysname_lhreycpu does not exist
.

Top 10 slowest examples (307.13 seconds, 75.8% of total time):
  Copy Service behaves like service copied should be subset of {"body"=>"{\"basePath\":\"https://hello-world-api.3scale.net\",\"apiVersion\":\"v1\",\"apis\":[{\"pat...alse, "system_name"=>"myActiveDocs25554178075932555417807594", "updated_at"=>"2019-06-11T10:01:40Z"} comparing keys ["name"]
    95.95 seconds ./spec/shared_examples.rb:34
  Update Service behaves like service copied should be subset of {"body"=>"{\"basePath\":\"https://hello-world-api.3scale.net\",\"apiVersion\":\"v1\",\"apis\":[{\"pat...alse, "system_name"=>"myActiveDocs25554178075912555417807592", "updated_at"=>"2019-06-11T09:59:27Z"} comparing keys ["name"]
    86.49 seconds ./spec/shared_examples.rb:34
  OpenAPI import basepath diff request url is rewritten
    23.95 seconds ./spec/integration/commands/import_command/openapi/basepath_spec.rb:40
  ActiveDocs Create command with the specified activedocs not existing specifying options successfully creates a new activedocs with them
    19.11 seconds ./spec/integration/commands/activedocs_command/create_command_spec.rb:37
  OpenAPI import OIDC service oidc settings are updated
    17.33 seconds ./spec/integration/commands/import_command/openapi/oidc_spec.rb:14
  Application Plan Import should be subset of {"created_at"=>"2019-06-11T09:57:39Z", "description"=>"Number of API hits", "friendly_name"=>"Hits", ...self"}], "name"=>"hits", "system_name"=>"hits", "unit"=>"hit", "updated_at"=>"2019-06-11T09:57:39Z"}, {"created_at"=>"2019-06-11T09:57:43Z", "description"=>"Metric01", "friendly_name"=>"metric_01", "id"=... "name"=>"metric_01", "system_name"=>"metric_01", "unit"=>"1", "updated_at"=>"2019-06-11T09:57:43Z"}, and {"created_at"=>"2019-06-11T09:57:45Z", "friendly_name"=>"method_01", "id"=>2555418326627, "links"=>[{...name"=>"method_01", "system_name"=>"method_01", "unit"=>"hit", "updated_at"=>"2019-06-11T09:57:45Z"} comparing keys ["name", "system_name", "friendly_name", "description", "unit"]
    16.94 seconds ./spec/integration/commands/plans_command/plan_import_spec.rb:27
  OpenAPI import basic test expected elements are imported
    15.06 seconds ./spec/integration/commands/import_command/openapi/basic_spec.rb:34
  Service List command With multiple existing services lists svc_ref_2
    11.71 seconds ./spec/integration/commands/service_command/list_command_spec.rb:26
  Service Apply command When service not exists and options are specified is created with those options set
    11.32 seconds ./spec/integration/commands/service_command/apply_command_spec.rb:28
  Application Plan Export should include {"system_name" => "metric_01", "friendly_name" => "metric_01", "name" => "metric_01", "unit" => "1"}
    9.26 seconds ./spec/integration/commands/plans_command/plan_export_spec.rb:81

Top 10 slowest example groups:
  Copy Service
    95.95 seconds average (95.95 seconds / 1 example) ./spec/integration/commands/copy_command/copy_service_spec.rb:1
  Update Service
    86.49 seconds average (86.49 seconds / 1 example) ./spec/integration/commands/update_command/update_all_service_spec.rb:1
  OpenAPI import basepath diff
    23.95 seconds average (23.95 seconds / 1 example) ./spec/integration/commands/import_command/openapi/basepath_spec.rb:1
  OpenAPI import OIDC service
    17.33 seconds average (17.33 seconds / 1 example) ./spec/integration/commands/import_command/openapi/oidc_spec.rb:1
  Application Plan Import
    16.94 seconds average (16.94 seconds / 1 example) ./spec/integration/commands/plans_command/plan_import_spec.rb:1
  OpenAPI import basic test
    15.06 seconds average (15.06 seconds / 1 example) ./spec/integration/commands/import_command/openapi/basic_spec.rb:1
  ActiveDocs Create command
    10.8 seconds average (32.4 seconds / 3 examples) ./spec/integration/commands/activedocs_command/create_command_spec.rb:1
  Application Plan Export
    9.26 seconds average (9.26 seconds / 1 example) ./spec/integration/commands/plans_command/plan_export_spec.rb:1
  Service List command
    8.84 seconds average (17.68 seconds / 2 examples) ./spec/integration/commands/service_command/list_command_spec.rb:1
  Service Apply command
    7.85 seconds average (23.54 seconds / 3 examples) ./spec/integration/commands/service_command/apply_command_spec.rb:1

Finished in 6 minutes 45 seconds (files took 0.53555 seconds to load)
46 examples, 0 failures

Randomized with seed 28885

@eguzki

eguzki commented Jun 11, 2019

Copy link
Copy Markdown
Member

@nmasse-itix We plan to fix this issue and let PR's from forked repos.

Meanwhile, exceptionally, I have tested locally this PR as well and passes.

@eguzki
eguzki merged commit 90fb678 into 3scale:master Jun 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

Development

Successfully merging this pull request may close these issues.

incorrect type for the --cost-per-month and --setup-fee options

2 participants