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

coryodaniel / k8s / 807e93631268e5fd52ca29e3e4755088cf11bf27-PR-262

pending completion
807e93631268e5fd52ca29e3e4755088cf11bf27-PR-262

Pull #262

github

mruoss
add possibility to wait for delete
Pull Request #262: add possibility to wait for delete

6 of 6 new or added lines in 1 file covered. (100.0%)

732 of 1009 relevant lines covered (72.55%)

44.92 hits per line

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

0.0
/lib/k8s/conn/auth/basic_auth.ex
1
defmodule K8s.Conn.Auth.BasicAuth do
2
  @moduledoc """
3
  basic auth cluster authentication
4
  """
5

6
  @behaviour K8s.Conn.Auth
7

8
  defstruct [:token]
9
  @type t :: %__MODULE__{token: binary}
10

11
  @impl true
12
  @spec create(map(), String.t()) :: {:ok, t()} | :skip
13
  def create(%{"username" => username, "password" => password}, _) do
×
14
    {:ok, %__MODULE__{token: Base.encode64("#{username}:#{password}")}}
×
15
  end
16

17
  def create(_, _), do: :skip
×
18

19
  defimpl K8s.Conn.RequestOptions, for: K8s.Conn.Auth.BasicAuth do
20
    @doc "Generates HTTP Authorization options for basic auth authentication"
21
    @spec generate(K8s.Conn.Auth.BasicAuth.t()) :: K8s.Conn.RequestOptions.generate_t()
22
    def generate(%K8s.Conn.Auth.BasicAuth{token: token}) do
×
23
      {:ok,
24
       %K8s.Conn.RequestOptions{
25
         headers: [{:Authorization, "Basic #{token}"}],
×
26
         ssl_options: []
27
       }}
28
    end
29
  end
30
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