Skip to content

Commit

Permalink
typo in attr name
Browse files Browse the repository at this point in the history
  • Loading branch information
suprjinx committed Sep 30, 2024
1 parent 9d65640 commit 3b37d3d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/lib/clients/vault_test.rb
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
require "test_helper"

class VaultTest < ActiveSupport::TestCase
attr_reader :intermedia_ca_mount
attr_reader :intermediate_ca_mount
attr_reader :root_ca_mount

setup do
@client = Clients::Vault
@root_ca_mount = SecureRandom.hex(4)
@intermedia_ca_mount = SecureRandom.hex(4)
@intermediate_ca_mount = SecureRandom.hex(4)
end

teardown do
vault_client.sys.unmount(root_ca_mount)
vault_client.sys.unmount(intermedia_ca_mount)
vault_client.sys.unmount(intermediate_ca_mount)
end

test "#configure_kv" do
@client.stub :kv_mount, intermedia_ca_mount do
@client.stub :kv_mount, intermediate_ca_mount do
assert @client.configure_kv
engines = vault_client.sys.mounts
assert_equal "kv", engines[intermedia_ca_mount.to_sym].type
assert_equal "kv", engines[intermediate_ca_mount.to_sym].type
end
end

test "#configure_pki" do
@client.stub :root_ca_mount, root_ca_mount do
@client.stub :intermediate_ca_mount, intermedia_ca_mount do
@client.stub :intermediate_ca_mount, intermediate_ca_mount do
assert @client.configure_pki

[root_ca_mount, intermedia_ca_mount].each do |mount|
[root_ca_mount, intermediate_ca_mount].each do |mount|

Check failure on line 31 in test/lib/clients/vault_test.rb

View workflow job for this annotation

GitHub Actions / build_test

Layout/SpaceInsideArrayLiteralBrackets: Use space inside array brackets.

Check failure on line 31 in test/lib/clients/vault_test.rb

View workflow job for this annotation

GitHub Actions / build_test

Layout/SpaceInsideArrayLiteralBrackets: Use space inside array brackets.
engines = vault_client.sys.mounts
assert_equal "pki", engines[mount.to_sym].type

Expand All @@ -40,7 +40,7 @@ class VaultTest < ActiveSupport::TestCase
assert_equal "#{vault_addr}/v1/#{mount}", cluster_config[:aia_path]
end

role_config = vault_client.logical.read("#{intermedia_ca_mount}/roles/astral").data
role_config = vault_client.logical.read("#{intermediate_ca_mount}/roles/astral").data
assert_not_nil role_config[:issuer_ref]
assert_equal 720.hours, role_config[:max_ttl]
assert_equal true, role_config[:allow_any_name]
Expand Down

0 comments on commit 3b37d3d

Please sign in to comment.