Skip to content

Commit

Permalink
Support both HTTP and HTTPS schemes in esti lakectl doctor tests (#6619)
Browse files Browse the repository at this point in the history
  • Loading branch information
eladlachmi authored Sep 19, 2023
1 parent bf964ef commit b92356b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitallowed
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ AKIAIO5FODNN7EXAMPLE
AKIAIOSFODNN3EXAMPLE
AKIAIOSFODNN7EXAMPLE
AKIAJVHTOKZWGCD2QQYQ
AKIAJZZZZZZZZZZZZZZQ
wJalrXUtnFEMI/K3MDENG/bPxRfiCYEXAMPLEKEY
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
2 changes: 1 addition & 1 deletion esti/golden/lakectl_doctor_wrong_endpoint.golden
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
It looks like endpoint url is wrong.

Suspicious URI format for server.endpoint_url: http://${HOST}/api/v11
Suspicious URI format for server.endpoint_url: ${HOST}/api/v11
2 changes: 1 addition & 1 deletion esti/golden/lakectl_doctor_wrong_endpoint_verbose.golden
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Couldn't find a problem with access key format.
Trying to validate secret access key format.
Couldn't find a problem with secret access key format.
Trying to validate endpoint URL format.
Suspicious URI format for server.endpoint_url: http://${HOST}/api/v11
Suspicious URI format for server.endpoint_url: ${HOST}/api/v11
3 changes: 2 additions & 1 deletion esti/lakectl_doctor_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package esti

import (
"fmt"
"net/url"
"testing"

Expand All @@ -17,7 +18,7 @@ func TestLakectlDoctor(t *testing.T) {
require.NoError(t, err)
vars := map[string]string{
"LAKEFS_ENDPOINT": endPointURL,
"HOST": u.Host,
"HOST": fmt.Sprintf("%s://%s", u.Scheme, u.Host),
}

RunCmdAndVerifySuccessWithFile(t, LakectlWithParams(accessKeyID, secretAccessKey, endPointURL)+" doctor", false, "lakectl_doctor_ok", vars)
Expand Down

0 comments on commit b92356b

Please sign in to comment.