Skip to content

Commit

Permalink
Merge pull request #12402 from simondeziel/loki-cert-check
Browse files Browse the repository at this point in the history
loki: enable TLS verification if a CA cert is provided
  • Loading branch information
tomponline authored Oct 24, 2023
2 parents a9a8be3 + dd1c285 commit db21d0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lxd/loki/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func NewClient(ctx context.Context, url *url.URL, username string, password stri
}

if caCert != "" {
tlsConfig, err := shared.GetTLSConfigMem("", "", caCert, "", true)
tlsConfig, err := shared.GetTLSConfigMem("", "", caCert, "", false)
if err != nil {
return nil
}
Expand Down
8 changes: 4 additions & 4 deletions test/suites/container_devices_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ test_container_devices_unix() {
lxc start "${ctName}"
! ls "${LXD_DIR}"/devices/"${ctName}"/unix.test--dev--dynamic.tmp-testdev
mknod "${testDev}" "${deviceTypeCode}" 0 0
sleep 1
sleep 2
lxc exec "${ctName}" -- mount | grep "/tmp/testdev"
lxc exec "${ctName}" -- stat -c '%F %a %t %T' /tmp/testdev | grep "${deviceTypeDesc} 660 0 0"
stat -c '%F %a %t %T' "${LXD_DIR}"/devices/"${ctName}"/unix.test--dev--dynamic.tmp-testdev | grep "${deviceTypeDesc} 660 0 0"
Expand All @@ -112,7 +112,7 @@ test_container_devices_unix() {
shutdown_lxd "${LXD_DIR}"
respawn_lxd "${LXD_DIR}" true
mknod "${testDev}" "${deviceTypeCode}" 0 0
sleep 1
sleep 2
lxc exec "${ctName}" -- mount | grep "/tmp/testdev"
lxc exec "${ctName}" -- stat -c '%F %a %t %T' /tmp/testdev | grep "${deviceTypeDesc} 660 0 0"
stat -c '%F %a %t %T' "${LXD_DIR}"/devices/"${ctName}"/unix.test--dev--dynamic.tmp-testdev | grep "${deviceTypeDesc} 660 0 0"
Expand All @@ -128,7 +128,7 @@ test_container_devices_unix() {

mkdir "${testDev}"
mknod "${testDevSubDir}" "${deviceTypeCode}" 0 0
sleep 1
sleep 2
lxc exec "${ctName}" -- mount | grep "/tmp/testdev"
lxc exec "${ctName}" -- stat -c '%F %a %t %T' /tmp/testdev | grep "${deviceTypeDesc} 660 0 0"
stat -c '%F %a %t %T' "${LXD_DIR}"/devices/"${ctName}"/unix.test--dev--dynamic.tmp-testdev | grep "${deviceTypeDesc} 660 0 0"
Expand All @@ -147,7 +147,7 @@ test_container_devices_unix() {
lxc launch testimage "${ctName}2"
lxc config device add "${ctName}2" test-dev-dynamic "${deviceType}" required=false source="${testDev}" path=/tmp/testdev2
mknod "${testDev}" "${deviceTypeCode}" 0 0
sleep 1
sleep 2
lxc exec "${ctName}1" -- mount | grep "/tmp/testdev1"
lxc exec "${ctName}1" -- stat -c '%F %a %t %T' /tmp/testdev1 | grep "${deviceTypeDesc} 660 0 0"
stat -c '%F %a %t %T' "${LXD_DIR}"/devices/"${ctName}"1/unix.test--dev--dynamic.tmp-testdev1 | grep "${deviceTypeDesc} 660 0 0"
Expand Down

0 comments on commit db21d0e

Please sign in to comment.