Skip to content

Commit

Permalink
Remove deprecated MonitoringURLs (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
rocketeerbkw committed Feb 9, 2023
1 parent dadab12 commit 2bf5e68
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,6 @@ type Environment struct {
Deleted string `json:"deleted,omitempty"`
Route string `json:"route,omitempty"`
Routes string `json:"routes,omitempty"`
MonitoringUrls string `json:"monitoringUrls,omitempty"`
EnvVariables []EnvironmentVariable `json:"envVariables,omitempty"`
Backups []Backup `json:"backups,omitempty"`
Tasks []Task `json:"tasks,omitempty"`
Expand Down
3 changes: 1 addition & 2 deletions pkg/lagoon/environments/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func processEnvInfo(projectByName []byte) ([]byte, error) {
var data []output.Data
data = append(data, environmentData)
dataMain := output.Table{
Header: []string{"ID", "EnvironmentName", "EnvironmentType", "DeployType", "Created", "OpenshiftProjectName", "Route", "Routes", "MonitoringURLS", "AutoIdle", "DeployTitle", "DeployBaseRef", "DeployHeadRef"},
Header: []string{"ID", "EnvironmentName", "EnvironmentType", "DeployType", "Created", "OpenshiftProjectName", "Route", "Routes", "AutoIdle", "DeployTitle", "DeployBaseRef", "DeployHeadRef"},
Data: data,
}
return json.Marshal(dataMain)
Expand Down Expand Up @@ -160,7 +160,6 @@ func processEnvExtra(environment api.Environment) []string {
fmt.Sprintf("%v", envOpenshiftProjectName),
fmt.Sprintf("%v", envRoute),
fmt.Sprintf("%v", envRoutes),
fmt.Sprintf("%v", "-"), // MonitoringURLS is deprecated, don't query this data
fmt.Sprintf("%v", envAutoIdle),
fmt.Sprintf("%v", envDeployTitle),
fmt.Sprintf("%v", envDeployBaseRef),
Expand Down
2 changes: 1 addition & 1 deletion pkg/lagoon/environments/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func checkEqual(t *testing.T, got, want interface{}, msgs ...interface{}) {

func TestGetEnvironmentByName(t *testing.T) {
var all = `{"autoIdle":1,"created":"2019-10-29 04:26:11","deleted":"0000-00-00 00:00:00","deployBaseRef":"Master","deployHeadRef":null,"deployTitle":null,"deployType":"branch","environmentType":"production","id":3,"name":"Master","openshiftProjectName":"high-cotton-master","route":"http://highcotton.org","routes":"http://highcotton.org,https://varnish-highcotton-org-prod.us.amazee.io,https://nginx-highcotton-org-prod.us.amazee.io","updated":"2019-10-29 04:26:43"}`
var allSuccess = `{"header":["ID","EnvironmentName","EnvironmentType","DeployType","Created","OpenshiftProjectName","Route","Routes","MonitoringURLS","AutoIdle","DeployTitle","DeployBaseRef","DeployHeadRef"],"data":[["3","Master","production","branch","2019-10-29 04:26:11","high-cotton-master","http://highcotton.org","http://highcotton.org,https://varnish-highcotton-org-prod.us.amazee.io,https://nginx-highcotton-org-prod.us.amazee.io","-","1","-","Master","-"]]}`
var allSuccess = `{"header":["ID","EnvironmentName","EnvironmentType","DeployType","Created","OpenshiftProjectName","Route","Routes","AutoIdle","DeployTitle","DeployBaseRef","DeployHeadRef"],"data":[["3","Master","production","branch","2019-10-29 04:26:11","high-cotton-master","http://highcotton.org","http://highcotton.org,https://varnish-highcotton-org-prod.us.amazee.io,https://nginx-highcotton-org-prod.us.amazee.io","1","-","Master","-"]]}`

testResult, err := processEnvInfo([]byte(all))
if err != nil {
Expand Down

0 comments on commit 2bf5e68

Please sign in to comment.