Skip to content

Commit

Permalink
Add configuration override capability to the fake Defined.net HTTP AP…
Browse files Browse the repository at this point in the history
…I server
  • Loading branch information
janartodesk committed Nov 28, 2024
1 parent e47eb5e commit 3adfc0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/testing/server/enrollment.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func (s *Server) createEnrollment(w http.ResponseWriter, r *http.Request) {
IsLighthouse: req.IsLighthouse,
IsRelay: req.IsRelay,
Tags: req.Tags,
ConfigOverrides: req.ConfigOverrides,
},
}

Expand Down
1 change: 1 addition & 0 deletions internal/testing/server/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func (s *Server) updateHost(w http.ResponseWriter, r *http.Request) {
state.Host.StaticAddresses = req.StaticAddresses
state.Host.ListenPort = req.ListenPort
state.Host.Tags = req.Tags
state.Host.ConfigOverrides = req.ConfigOverrides

if err := s.Hosts.Replace(*state); err != nil {
panic(err)
Expand Down

0 comments on commit 3adfc0f

Please sign in to comment.