-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update changelog for rc (#2360) * update changelog for rc * update changelog for rc Signed-off-by: matt durham <[email protected]> * fix conversion * Fanout: reduce allocation related to staleness tracking (#2405) (cherry picked from commit c58c114) * Actually use tls alloy and not yaml. (#2461) * Actually use tls alloy and not yaml. * remove bad test (cherry picked from commit 419e997) * Cherry pick staleness and tls. --------- Signed-off-by: matt durham <[email protected]> Co-authored-by: Piotr <[email protected]>
- Loading branch information
1 parent
954130d
commit c0b8217
Showing
6 changed files
with
63 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
package queue | ||
|
||
import ( | ||
common "github.com/prometheus/common/config" | ||
"github.com/grafana/alloy/syntax" | ||
"github.com/stretchr/testify/require" | ||
"strings" | ||
"testing" | ||
) | ||
|
||
func TestBasicAuthAndTLSBothSetError(t *testing.T) { | ||
args := defaultArgs() | ||
args.Endpoints = make([]EndpointConfig, 1) | ||
args.Endpoints[0] = defaultEndpointConfig() | ||
args.Endpoints[0].Name = "test" | ||
args.Endpoints[0].TLSConfig = &common.TLSConfig{} | ||
args.Endpoints[0].BasicAuth = &BasicAuth{} | ||
err := args.Validate() | ||
require.Error(t, err) | ||
require.True(t, strings.Contains(err.Error(), "cannot have both BasicAuth and TLSConfig")) | ||
func TestParsingTLSConfig(t *testing.T) { | ||
var args Arguments | ||
err := syntax.Unmarshal([]byte(` | ||
endpoint "cloud" { | ||
url = "http://example.com" | ||
basic_auth { | ||
username = 12345 | ||
password = "password" | ||
} | ||
tls_config { | ||
insecure_skip_verify = true | ||
} | ||
} | ||
`), &args) | ||
|
||
require.NoError(t, err) | ||
} |