• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supavisor / e5e7ebfe80dbec4965226225050d4ef5c8216e88-PR-605

21 Feb 2025 02:35PM UTC coverage: 45.973% (-0.03%) from 46.003%
e5e7ebfe80dbec4965226225050d4ef5c8216e88-PR-605

Pull #605

github

hauleth
fix: remaining SSL connections that need to set `verify_none` option
Pull Request #605: fix: remaining SSL connections that need to set `verify_none` option

2 of 9 new or added lines in 3 files covered. (22.22%)

267 existing lines in 26 files now uncovered.

959 of 2086 relevant lines covered (45.97%)

635.02 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/lib/supavisor/tenants/user.ex
1
defmodule Supavisor.Tenants.User do
2
  @moduledoc false
3
  use Ecto.Schema
4
  import Ecto.Changeset
5

6
  @type t :: %__MODULE__{}
7

8
  @primary_key {:id, :binary_id, autogenerate: true}
9
  @schema_prefix "_supavisor"
10

11
  schema "users" do
426✔
12
    field(:db_user_alias, :string)
13
    field(:db_user, :string)
14
    field(:db_password, Supavisor.Encrypted.Binary, source: :db_pass_encrypted)
15
    field(:is_manager, :boolean, default: false)
16
    field(:mode_type, Ecto.Enum, values: [:transaction, :session])
17
    field(:pool_size, :integer)
18
    field(:pool_checkout_timeout, :integer, default: 60_000)
19
    field(:max_clients, :integer)
20
    belongs_to(:tenant, Supavisor.Tenants.Tenant, foreign_key: :tenant_external_id, type: :string)
21
    timestamps()
22
  end
23

24
  @doc false
25
  def changeset(user, attrs) do
26
    attrs =
24✔
27
      if attrs["db_user_alias"] do
UNCOV
28
        attrs
3✔
29
      else
30
        Map.put(attrs, "db_user_alias", attrs["db_user"])
21✔
31
      end
32

33
    user
34
    |> cast(attrs, [
35
      :db_user_alias,
36
      :db_user,
37
      :db_password,
38
      :pool_size,
39
      :mode_type,
40
      :is_manager,
41
      :pool_checkout_timeout,
42
      :max_clients
43
    ])
44
    |> validate_required([
24✔
45
      :db_user_alias,
46
      :db_user,
47
      :db_password,
48
      :pool_size,
49
      :mode_type
50
    ])
51
  end
52
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc