Skip to content

Commit

Permalink
add a test for rotated system secret getter
Browse files Browse the repository at this point in the history
Signed-off-by: Shota SAWADA <xiootas@gmail.com>
  • Loading branch information
sawadashota committed Dec 27, 2018
1 parent 9449b0e commit 2165eaa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ func TestSystemSecret(t *testing.T) {
assert.EqualValues(t, c.GetSystemSecret(), c2.GetSystemSecret())
}

func TestRotatedSystemSecrets(t *testing.T) {
c := &Config{RotatedSystemSecret: "foobarbazbarasdfasdffoobarbazbarasdfasdf"}
assert.EqualValues(t, c.GetRotatedSystemSecrets(), c.GetRotatedSystemSecrets())
c2 := &Config{RotatedSystemSecret: ""}
assert.Nil(t, c2.GetRotatedSystemSecrets())
}

func TestResolve(t *testing.T) {
c := &Config{EndpointURL: "https://localhost:1234"}
assert.Equal(t, c.Resolve("foo", "bar").String(), "https://localhost:1234/foo/bar")
Expand Down

0 comments on commit 2165eaa

Please sign in to comment.