Skip to content

Commit

Permalink
TEST CODE
Browse files Browse the repository at this point in the history
  • Loading branch information
indresh-28 committed Aug 9, 2023
1 parent 363da42 commit cae18a3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/pkg/api/cluster_apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ func (s *Server) GetClusterApps(ctx context.Context, request *serverpb.GetCluste
StatusMessage: "failed to get cluster application from agent"}, nil
}

s.log.Info("DATA RECIED====", resp.AppData)

appConfigData, err := json.Marshal(resp.AppData)
if err != nil {
s.log.Error("failed to marshall appConfig", err)
return &serverpb.GetClusterAppsResponse{Status: serverpb.StatusCode_INTERNRAL_ERROR,
StatusMessage: "failed to marshall appConfig"}, nil
}

s.log.Info("DATA RECIED==== Bytes===", appConfigData)
var clusterAppConfig []*serverpb.ClusterAppConfig
err = json.Unmarshal(appConfigData, &clusterAppConfig)
if err != nil {
Expand Down Expand Up @@ -79,13 +82,16 @@ func (s *Server) GetClusterAppLaunchConfigs(ctx context.Context, request *server
StatusMessage: "failed to get cluster application launches from agent"}, err
}

s.log.Info("DATA appConfigData==== Bytes===", resp.LaunchConfigList, resp)
appConfigData, err := json.Marshal(resp.LaunchConfigList)
if err != nil {
s.log.Error("failed to marshall app launches", err)
return &serverpb.GetClusterAppLaunchConfigsResponse{Status: serverpb.StatusCode_INTERNRAL_ERROR,
StatusMessage: "failed to marshall app launches"}, nil
}

s.log.Info("DATA appConfigData==== Bytes===", appConfigData)

var clusterAppLaunchConfig []*serverpb.AppLaunchConfig
err = json.Unmarshal(appConfigData, &clusterAppLaunchConfig)
if err != nil {
Expand Down

0 comments on commit cae18a3

Please sign in to comment.