Skip to content

Commit

Permalink
Make tls.certificate-file and tls.private-key-file required fields
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekn committed Feb 14, 2017
1 parent 6878ff6 commit 532ac9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions services/federation/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type Config struct {
ReverseFederation string `toml:"reverse-federation" valid:"optional"`
} `valid:"required"`
TLS struct {
CertificateFile string `toml:"certificate-file" valid:"optional"`
PrivateKeyFile string `toml:"private-key-file" valid:"optional"`
CertificateFile string `toml:"certificate-file" valid:"required"`
PrivateKeyFile string `toml:"private-key-file" valid:"required"`
} `valid:"optional"`
}

Expand Down
8 changes: 4 additions & 4 deletions support/config/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ func TestUndecoded(t *testing.T) {
var val struct {
Test string `toml:"test" valid:"optional"`
TLS struct {
CertificateFile string `toml:"certificate-file" valid:"optional"`
PrivateKeyFile string `toml:"private-key-file" valid:"optional"`
CertificateFile string `toml:"certificate-file" valid:"required"`
PrivateKeyFile string `toml:"private-key-file" valid:"required"`
} `valid:"optional"`
}

Expand All @@ -108,8 +108,8 @@ func TestCorrect(t *testing.T) {
var val struct {
Test string `toml:"test" valid:"optional"`
TLS struct {
CertificateFile string `toml:"certificate-file" valid:"optional"`
PrivateKeyFile string `toml:"private-key-file" valid:"optional"`
CertificateFile string `toml:"certificate-file" valid:"required"`
PrivateKeyFile string `toml:"private-key-file" valid:"required"`
} `valid:"optional"`
}

Expand Down

0 comments on commit 532ac9b

Please sign in to comment.