Skip to content

Commit

Permalink
Update CHANGELOG.md and address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: clyang82 <chuyang@redhat.com>
  • Loading branch information
clyang82 committed Dec 16, 2021
1 parent ad53208 commit c0c2758
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 27 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
- [#4897](https://github.com/thanos-io/thanos/pull/4897) Querier: Add validation for querier address flags.
- [#4903](https://github.com/thanos-io/thanos/pull/4903) Compactor: Added tracing support for compaction.
- [#4909](https://github.com/thanos-io/thanos/pull/4909) Compactor: Add flag --max-time / --min-time to filter blocks that are ready to be compacted.
- [#4946](https://github.com/thanos-io/thanos/pull/4946) Store: Support tls_config configuration for the s3 minio client.

### Fixed

Expand Down
33 changes: 6 additions & 27 deletions pkg/objstore/s3/s3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,29 +177,11 @@ http_config:
cfg, err := parseConfig(input)
testutil.Ok(t, err)

if cfg.HTTPConfig.TLSConfig.CAFile != "/certs/ca.crt" {
t.Errorf("parsing of ca_file failed: got %v, expected %v",
cfg.HTTPConfig.TLSConfig.CAFile, "/certs/ca.crt")
}

if cfg.HTTPConfig.TLSConfig.CertFile != "/certs/cert.crt" {
t.Errorf("parsing of cert_file failed: got %v, expected %v",
cfg.HTTPConfig.TLSConfig.CertFile, "/certs/cert.crt")
}

if cfg.HTTPConfig.TLSConfig.KeyFile != "/certs/key.key" {
t.Errorf("parsing of key_file failed: got %v, expected %v",
cfg.HTTPConfig.TLSConfig.KeyFile, "/certs/key.key")
}

if cfg.HTTPConfig.TLSConfig.ServerName != "server" {
t.Errorf("parsing of server_name failed: got %v, expected %v",
cfg.HTTPConfig.TLSConfig.ServerName, "server")
}

if cfg.HTTPConfig.TLSConfig.InsecureSkipVerify {
t.Errorf("parsing of insecure_skip_verify failed: got %v, expected %v", cfg.HTTPConfig.InsecureSkipVerify, false)
}
testutil.Equals(t, "/certs/ca.crt", cfg.HTTPConfig.TLSConfig.CAFile)
testutil.Equals(t, "/certs/cert.crt", cfg.HTTPConfig.TLSConfig.CertFile)
testutil.Equals(t, "/certs/key.key", cfg.HTTPConfig.TLSConfig.KeyFile)
testutil.Equals(t, "server", cfg.HTTPConfig.TLSConfig.ServerName)
testutil.Equals(t, false, cfg.HTTPConfig.TLSConfig.InsecureSkipVerify)
}

func TestParseConfig_CustomLegacyInsecureSkipVerify(t *testing.T) {
Expand All @@ -214,10 +196,7 @@ http_config:
testutil.Ok(t, err)
transport, err := DefaultTransport(cfg)
testutil.Ok(t, err)

if !transport.TLSClientConfig.InsecureSkipVerify {
t.Errorf("parsing of insecure_skip_verify failed: got %v, expected %v", transport.TLSClientConfig.InsecureSkipVerify, true)
}
testutil.Equals(t, true, transport.TLSClientConfig.InsecureSkipVerify)
}

func TestValidate_OK(t *testing.T) {
Expand Down

0 comments on commit c0c2758

Please sign in to comment.