From 76aedca6b2ff24648bddd3c3d8b7e00a8393f917 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 24 Oct 2018 13:56:39 +0800 Subject: [PATCH] Update test spec to use "localhost" instead (#1300) * update test spec to use localhost intead * add new files --- .../3_0/petstore-with-fake-endpoints-models-for-testing.yaml | 4 ++-- samples/client/petstore/ruby/lib/petstore/configuration.rb | 4 ++-- samples/client/petstore/ruby/spec/configuration_spec.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml index 8f937652fd83..10f904b50ef8 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -994,8 +994,8 @@ servers: - 80 - 8080 default: 80 - - url: https://api.gigantic-server.com:8080/{version} - description: The production API server + - url: https://localhost:8080/{version} + description: The local server variables: version: enum: diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb index 63b8dce9e59f..268674f7d618 100644 --- a/samples/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb @@ -254,8 +254,8 @@ module Petstore } }, { - url: "https://api.gigantic-server.com:8080/{version}", - description: "The production API server", + url: "https://localhost:8080/{version}", + description: "The local server", variables: { version: { description: "No descriptoin provided", diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb index e7f9eb397270..e666b7bc0043 100644 --- a/samples/client/petstore/ruby/spec/configuration_spec.rb +++ b/samples/client/petstore/ruby/spec/configuration_spec.rb @@ -40,12 +40,12 @@ describe Petstore::Configuration do it 'should get the second url with default values' do url = config.server_url(1) - expect(url).to eq("https://api.gigantic-server.com:8080/v2") + expect(url).to eq("https://localhost:8080/v2") end it 'should get the second url' do url = config.server_url(1, version: "v1") - expect(url).to eq("https://api.gigantic-server.com:8080/v1") + expect(url).to eq("https://localhost:8080/v1") end it 'should raise error due to invalid enum value' do