Skip to content

Commit

Permalink
09-hybrid_mode/05-ocsp_spec.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Sep 30, 2024
1 parent a405cf5 commit 28916cb
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions spec/02-integration/09-hybrid_mode/05-ocsp_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu
-- additional attributes for PKI:
cluster_mtls = "pki",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
cluster_incremental_sync = inc_sync,
}))

set_ocsp_status("good")
Expand All @@ -58,6 +59,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu
cluster_mtls = "pki",
cluster_server_name = "kong_clustering",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
cluster_incremental_sync = inc_sync,
}))
end)

Expand Down Expand Up @@ -111,6 +113,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu
-- additional attributes for PKI:
cluster_mtls = "pki",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
cluster_incremental_sync = inc_sync,
}))

set_ocsp_status("revoked")
Expand All @@ -128,6 +131,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu
cluster_server_name = "kong_clustering",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
nginx_conf = "spec/fixtures/custom_nginx.template",
cluster_incremental_sync = inc_sync,
}))
end)

Expand Down Expand Up @@ -179,6 +183,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu
-- additional attributes for PKI:
cluster_mtls = "pki",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
cluster_incremental_sync = inc_sync,
}))

set_ocsp_status("error")
Expand All @@ -196,6 +201,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu
cluster_server_name = "kong_clustering",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
nginx_conf = "spec/fixtures/custom_nginx.template",
cluster_incremental_sync = inc_sync,
}))
end)

Expand Down Expand Up @@ -226,7 +232,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu
end)
end)

describe("cluster_ocsp = off works with #" .. strategy .. " backend", function()
describe("cluster_ocsp = off works with #" .. strategy .. " inc_sync=" .. inc_sync .. " backend", function()
describe("DP certificate revoked, not checking for OCSP", function()
lazy_setup(function()
helpers.get_db_utils(strategy, {
Expand All @@ -250,6 +256,7 @@ describe("cluster_ocsp = off works with #" .. strategy .. " backend", function()
-- additional attributes for PKI:
cluster_mtls = "pki",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
cluster_incremental_sync = inc_sync,
}))

set_ocsp_status("revoked")
Expand All @@ -267,6 +274,7 @@ describe("cluster_ocsp = off works with #" .. strategy .. " backend", function()
cluster_mtls = "pki",
cluster_server_name = "kong_clustering",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
cluster_incremental_sync = inc_sync,
}))
end)

Expand Down Expand Up @@ -298,7 +306,7 @@ describe("cluster_ocsp = off works with #" .. strategy .. " backend", function()
end)
end)

describe("cluster_ocsp = optional works with #" .. strategy .. " backend", function()
describe("cluster_ocsp = optional works with #" .. strategy .. " inc_sync=" .. inc_sync .. " backend", function()
describe("DP certificate revoked", function()
lazy_setup(function()
helpers.get_db_utils(strategy, {
Expand All @@ -322,6 +330,7 @@ describe("cluster_ocsp = optional works with #" .. strategy .. " backend", funct
-- additional attributes for PKI:
cluster_mtls = "pki",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
cluster_incremental_sync = inc_sync,
}))

set_ocsp_status("revoked")
Expand All @@ -339,6 +348,7 @@ describe("cluster_ocsp = optional works with #" .. strategy .. " backend", funct
cluster_server_name = "kong_clustering",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
nginx_conf = "spec/fixtures/custom_nginx.template",
cluster_incremental_sync = inc_sync,
}))
end)

Expand Down Expand Up @@ -390,6 +400,7 @@ describe("cluster_ocsp = optional works with #" .. strategy .. " backend", funct
-- additional attributes for PKI:
cluster_mtls = "pki",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
cluster_incremental_sync = inc_sync,
}))

set_ocsp_status("error")
Expand All @@ -407,6 +418,7 @@ describe("cluster_ocsp = optional works with #" .. strategy .. " backend", funct
cluster_server_name = "kong_clustering",
cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt",
nginx_conf = "spec/fixtures/custom_nginx.template",
cluster_incremental_sync = inc_sync,
}))
end)

Expand Down

0 comments on commit 28916cb

Please sign in to comment.