| OLD | NEW | 
|    1 // Copyright 2015 The LUCI Authors. All rights reserved. |    1 // Copyright 2015 The LUCI Authors. All rights reserved. | 
|    2 // Use of this source code is governed under the Apache License, Version 2.0 |    2 // Use of this source code is governed under the Apache License, Version 2.0 | 
|    3 // that can be found in the LICENSE file. |    3 // that can be found in the LICENSE file. | 
|    4  |    4  | 
|    5 package swarming |    5 package swarming | 
|    6  |    6  | 
|    7 import ( |    7 import ( | 
|    8         "encoding/json" |    8         "encoding/json" | 
|    9         "fmt" |    9         "fmt" | 
|   10         "io/ioutil" |   10         "io/ioutil" | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
|   22         "github.com/luci/luci-go/common/clock/testclock" |   22         "github.com/luci/luci-go/common/clock/testclock" | 
|   23         memcfg "github.com/luci/luci-go/common/config/impl/memory" |   23         memcfg "github.com/luci/luci-go/common/config/impl/memory" | 
|   24         "github.com/luci/luci-go/common/errors" |   24         "github.com/luci/luci-go/common/errors" | 
|   25         miloProto "github.com/luci/luci-go/common/proto/milo" |   25         miloProto "github.com/luci/luci-go/common/proto/milo" | 
|   26         "github.com/luci/luci-go/logdog/api/endpoints/coordinator/logs/v1" |   26         "github.com/luci/luci-go/logdog/api/endpoints/coordinator/logs/v1" | 
|   27         "github.com/luci/luci-go/logdog/api/logpb" |   27         "github.com/luci/luci-go/logdog/api/logpb" | 
|   28         "github.com/luci/luci-go/logdog/client/coordinator" |   28         "github.com/luci/luci-go/logdog/client/coordinator" | 
|   29         "github.com/luci/luci-go/luci_config/server/cfgclient/backend/testconfig
     " |   29         "github.com/luci/luci-go/luci_config/server/cfgclient/backend/testconfig
     " | 
|   30         "github.com/luci/luci-go/milo/api/resp" |   30         "github.com/luci/luci-go/milo/api/resp" | 
|   31         "github.com/luci/luci-go/milo/appengine/common" |   31         "github.com/luci/luci-go/milo/appengine/common" | 
 |   32         "github.com/luci/luci-go/milo/appengine/common/model" | 
|   32         "github.com/luci/luci-go/server/auth" |   33         "github.com/luci/luci-go/server/auth" | 
|   33         "github.com/luci/luci-go/server/auth/authtest" |   34         "github.com/luci/luci-go/server/auth/authtest" | 
|   34         "github.com/luci/luci-go/server/templates" |   35         "github.com/luci/luci-go/server/templates" | 
|   35 ) |   36 ) | 
|   36  |   37  | 
|   37 type testCase struct { |   38 type testCase struct { | 
|   38         name string |   39         name string | 
|   39  |   40  | 
|   40         swarmResult string |   41         swarmResult string | 
|   41         swarmOutput string |   42         swarmOutput string | 
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  229                         }, |  230                         }, | 
|  230                 }, |  231                 }, | 
|  231         } |  232         } | 
|  232 } |  233 } | 
|  233  |  234  | 
|  234 // BuildTestData returns sample test data for swarming build pages. |  235 // BuildTestData returns sample test data for swarming build pages. | 
|  235 func BuildTestData() []common.TestBundle { |  236 func BuildTestData() []common.TestBundle { | 
|  236         basic := resp.MiloBuild{ |  237         basic := resp.MiloBuild{ | 
|  237                 Summary: resp.BuildComponent{ |  238                 Summary: resp.BuildComponent{ | 
|  238                         Label:    "Test swarming build", |  239                         Label:    "Test swarming build", | 
|  239 »       »       »       Status:   resp.Success, |  240 »       »       »       Status:   model.Success, | 
|  240                         Started:  time.Date(2016, 1, 2, 15, 4, 5, 999999999, tim
     e.UTC), |  241                         Started:  time.Date(2016, 1, 2, 15, 4, 5, 999999999, tim
     e.UTC), | 
|  241                         Finished: time.Date(2016, 1, 2, 15, 4, 6, 999999999, tim
     e.UTC), |  242                         Finished: time.Date(2016, 1, 2, 15, 4, 6, 999999999, tim
     e.UTC), | 
|  242                         Duration: time.Second, |  243                         Duration: time.Second, | 
|  243                 }, |  244                 }, | 
|  244         } |  245         } | 
|  245         results := []common.TestBundle{ |  246         results := []common.TestBundle{ | 
|  246                 { |  247                 { | 
|  247                         Description: "Basic successful build", |  248                         Description: "Basic successful build", | 
|  248                         Data:        templates.Args{"Build": basic}, |  249                         Data:        templates.Args{"Build": basic}, | 
|  249                 }, |  250                 }, | 
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  286 ` |  287 ` | 
|  287  |  288  | 
|  288 var aclConfgs = map[string]memcfg.ConfigSet{ |  289 var aclConfgs = map[string]memcfg.ConfigSet{ | 
|  289         "projects/secret": { |  290         "projects/secret": { | 
|  290                 "project.cfg": secretProjectCfg, |  291                 "project.cfg": secretProjectCfg, | 
|  291         }, |  292         }, | 
|  292         "projects/opensource": { |  293         "projects/opensource": { | 
|  293                 "project.cfg": publicProjectCfg, |  294                 "project.cfg": publicProjectCfg, | 
|  294         }, |  295         }, | 
|  295 } |  296 } | 
| OLD | NEW |