Skip to content

Commit

Permalink
Battermann/more stern tests 2 (#3239)
Browse files Browse the repository at this point in the history
  • Loading branch information
battermann authored Apr 24, 2023
1 parent 58b249e commit 19d4d54
Show file tree
Hide file tree
Showing 5 changed files with 239 additions and 162 deletions.
1 change: 1 addition & 0 deletions changelog.d/5-internal/pr-3239
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
More integration tests for stern/backoffice
2 changes: 1 addition & 1 deletion tools/stern/src/Stern/API/Routes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ type SternAPI =
:> Capture "tid" TeamId
:> "search-visibility"
:> ReqBody '[JSON] TeamSearchVisibility
:> Get '[JSON] NoContent
:> Put '[JSON] NoContent
)
:<|> Named "get-route-outlook-cal-config" (MkFeatureGetRoute OutlookCalIntegrationConfig)
:<|> Named "put-route-outlook-cal-config" (MkFeaturePutRouteTrivialConfigNoTTL OutlookCalIntegrationConfig)
Expand Down
2 changes: 2 additions & 0 deletions tools/stern/src/Stern/Intra.hs
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ setTeamFeatureFlag tid status = do
case statusCode resp of
200 -> pure ()
404 -> throwE (mkError status404 "bad-upstream" "team doesnt exist")
403 -> throwE (mkError status403 "bad-upstream" "legal hold config cannot be changed")
_ -> throwE (mkError status502 "bad-upstream" "bad response")
where
checkDaysLimit :: FeatureTTL -> Handler ()
Expand Down Expand Up @@ -592,6 +593,7 @@ setSearchVisibility tid typ = do
)
case statusCode resp of
200 -> pure ()
204 -> pure ()
403 ->
throwE $
mkError
Expand Down
Loading

0 comments on commit 19d4d54

Please sign in to comment.