Open
Description
Using Elixir 1.18.0 (compiled with Erlang/OTP 27).
cd clients/gax
mix test
Result:
1) test basic request (Gax.ApiTest)
test/gax/api_test.exs:30
** (Tesla.Mock.Error) Request not mocked
The following request was not mocked:
%Tesla.Env{
method: :get,
url: "https://example.com/v1/stores/store-1/pets",
query: [],
headers: [
{"x-goog-api-client", "gl-elixir/1.18.0 gax/0.4.1 gdcl/1.2.3"},
{"accept-encoding", "gzip, deflate, identity"}
],
body: nil,
status: nil,
opts: [],
__module__: TestClient.Connection,
__client__: %Tesla.Client{
fun: nil,
pre: [],
post: [],
adapter: {Tesla.Mock, :call, [[]]}
}
}
** (FunctionClauseError) no function clause matching in anonymous fn/1 in Gax.ApiTest."test basic request"/1
test/gax/api_test.exs:35: anonymous fn(%Tesla.Env{method: :get, url: "https://example.com/v1/stores/store-1/pets", query: [], headers: [{"x-goog-api-client", "gl-elixir/1.18.0 gax/0.4.1 gdcl/1.2.3"}, {"accept-encoding", "gzip, deflate, identity"}], body: nil, status: nil, opts: [], __module__: TestClient.Connection, __client__: %Tesla.Client{fun: nil, pre: [], post: [], adapter: {Tesla.Mock, :call, [[]]}}}) in Gax.ApiTest."test basic request"/1
(tesla 1.13.2) lib/tesla/mock.ex:269: Tesla.Mock.rescue_call/2
(tesla 1.13.2) lib/tesla/mock.ex:209: Tesla.Mock.call/2
(tesla 1.13.2) lib/tesla/middleware/compression.ex:156: Tesla.Middleware.DecompressResponse.call/3
(google_gax 0.4.1) test/test_client/api/pets.ex:35: TestClient.Api.Pets.pets_list_by_store/3
test/gax/api_test.exs:44: Gax.ApiTest."test basic request"/1
(ex_unit 1.18.0) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2
(stdlib 6.2) timer.erl:595: :timer.tc/2
(ex_unit 1.18.0) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4
code: {:ok, pets} = TestClient.Api.Pets.pets_list_by_store(conn, "store-1")
stacktrace:
(tesla 1.13.2) lib/tesla/mock.ex:272: Tesla.Mock.rescue_call/2
(tesla 1.13.2) lib/tesla/mock.ex:209: Tesla.Mock.call/2
(tesla 1.13.2) lib/tesla/middleware/compression.ex:156: Tesla.Middleware.DecompressResponse.call/3
(google_gax 0.4.1) test/test_client/api/pets.ex:35: TestClient.Api.Pets.pets_list_by_store/3
test/gax/api_test.exs:44: (test)
2) test request with compressed response (Gax.ApiTest)
test/gax/api_test.exs:56
** (Tesla.Mock.Error) Request not mocked
The following request was not mocked:
%Tesla.Env{
method: :get,
url: "https://example.com/v1/stores/store-1/pets",
query: [],
headers: [
{"x-goog-api-client", "gl-elixir/1.18.0 gax/0.4.1 gdcl/1.2.3"},
{"accept-encoding", "gzip, deflate, identity"}
],
body: nil,
status: nil,
opts: [],
__module__: TestClient.Connection,
__client__: %Tesla.Client{
fun: nil,
pre: [],
post: [],
adapter: {Tesla.Mock, :call, [[]]}
}
}
** (FunctionClauseError) no function clause matching in anonymous fn/1 in Gax.ApiTest."test request with compressed response"/1
test/gax/api_test.exs:61: anonymous fn(%Tesla.Env{method: :get, url: "https://example.com/v1/stores/store-1/pets", query: [], headers: [{"x-goog-api-client", "gl-elixir/1.18.0 gax/0.4.1 gdcl/1.2.3"}, {"accept-encoding", "gzip, deflate, identity"}], body: nil, status: nil, opts: [], __module__: TestClient.Connection, __client__: %Tesla.Client{fun: nil, pre: [], post: [], adapter: {Tesla.Mock, :call, [[]]}}}) in Gax.ApiTest."test request with compressed response"/1
(tesla 1.13.2) lib/tesla/mock.ex:269: Tesla.Mock.rescue_call/2
(tesla 1.13.2) lib/tesla/mock.ex:209: Tesla.Mock.call/2
(tesla 1.13.2) lib/tesla/middleware/compression.ex:156: Tesla.Middleware.DecompressResponse.call/3
(google_gax 0.4.1) test/test_client/api/pets.ex:35: TestClient.Api.Pets.pets_list_by_store/3
test/gax/api_test.exs:71: Gax.ApiTest."test request with compressed response"/1
(ex_unit 1.18.0) lib/ex_unit/runner.ex:511: ExUnit.Runner.exec_test/2
(stdlib 6.2) timer.erl:595: :timer.tc/2
(ex_unit 1.18.0) lib/ex_unit/runner.ex:433: anonymous fn/6 in ExUnit.Runner.spawn_test_monitor/4
code: {:ok, pets} = TestClient.Api.Pets.pets_list_by_store(conn, "store-1")
stacktrace:
(tesla 1.13.2) lib/tesla/mock.ex:272: Tesla.Mock.rescue_call/2
(tesla 1.13.2) lib/tesla/mock.ex:209: Tesla.Mock.call/2
(tesla 1.13.2) lib/tesla/middleware/compression.ex:156: Tesla.Middleware.DecompressResponse.call/3
(google_gax 0.4.1) test/test_client/api/pets.ex:35: TestClient.Api.Pets.pets_list_by_store/3
test/gax/api_test.exs:71: (test)
..............................................
Finished in 0.2 seconds (0.2s async, 0.03s sync)
1 doctest, 48 tests, 2 failures, 1 skipped