Skip to content

Commit

Permalink
Fix spec lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bonzofenix committed Jun 26, 2024
1 parent e29284c commit 471da8d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
3 changes: 1 addition & 2 deletions spec/jobs/eventgenerator/eventgenerator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@

it "does not set username nor password if not configured" do
properties["autoscaler"]["eventgenerator"] = {
"health" => {
}
"health" => {}
}
expect(rendered_template["health"]["password"]).to be_nil
expect(rendered_template["health"]["username"]).to be_nil
Expand Down
24 changes: 12 additions & 12 deletions spec/jobs/operator/operator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
context "config/operator.yml" do
it "does not set username nor password if not configured" do
expect(rendered_template["health"]).to include(
{"username" => nil, "password" => nil}
)
{
"username" => nil,
"password" => nil
}
)
end

it "does not include health port anymore" do
expect(rendered_template["health"].keys).not_to include(
"port"
)
expect(rendered_template["health"].keys).not_to include("port")
end

it "check operator basic auth username and password" do
Expand All @@ -32,13 +33,12 @@
}
}

expect(rendered_template["health"])
.to include(
{
"username" => "test-user",
"password" => "test-user-password"
}
)
expect(rendered_template["health"]).to include(
{
"username" => "test-user",
"password" => "test-user-password"
}
)
end

context "uses tls" do
Expand Down
7 changes: 5 additions & 2 deletions spec/jobs/scalingengine/scalingengine_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
context "config/scalingengine.yml" do
context "scalingengine" do
it "does not set username nor password if not configured" do

expect(rendered_template["health"]).to include({"username" => nil, "password" => nil})
end

Expand All @@ -30,7 +29,11 @@
}
}

expect(rendered_template["health"]).to include({"password" => "test-user-password" })
expect(rendered_template["health"]).to include(
{
"password" => "test-user-password"
}
)
end
end

Expand Down

0 comments on commit 471da8d

Please sign in to comment.