Skip to content

Commit

Permalink
[#142565807] - Added filter for objects larger than an area specified…
Browse files Browse the repository at this point in the history
… in pixels.
  • Loading branch information
cfreeman committed Apr 6, 2017
1 parent 26aafe6 commit eaec167
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 53 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Visit localhost:1323 in your browser.

## Testing for the backend:
```
$ go test -p 1 github.com/MeasureTheFuture/mothership/...
$ go test -p 1 github.com/MeasureTheFuture/scout/...
```

## License
Expand Down
8 changes: 4 additions & 4 deletions controllers/scout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ var _ = Describe("Scout controller", func() {
It("should return a list of all the attached scouts", func() {
s := models.Scout{"59ef7180-f6b2-4129-99bf-970eb4312b4b", "192.168.0.1",
8080, true, "foo", "calibrating", &models.ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

s2 := models.Scout{"eeef7180-f6b2-4129-99bf-970eb4312b4b", "192.168.0.2",
8080, true, "foop", "calibrating", &models.ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err = s2.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -126,7 +126,7 @@ var _ = Describe("Scout controller", func() {
It("should return a single scout", func() {
s := models.Scout{"59ef7180-f6b2-4129-99bf-970eb4312b4b", "192.168.0.1",
8080, true, "foo", "calibrated", &models.ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -152,7 +152,7 @@ var _ = Describe("Scout controller", func() {
It("should be able to update a single scout", func() {
s := models.Scout{"59ef7180-f6b2-4129-99bf-970eb4312b4b", "192.168.0.1",
8080, true, "foo", "calibrated", &models.ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand Down
7 changes: 7 additions & 0 deletions frontend/src/components/settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ var Settings = React.createClass({
var state = store.getState();

this.updateField("MinArea");
this.updateField("MaxArea");
this.updateField("MinDuration");
this.updateField("IdleDuration");
this.updateField("MogHistoryLength");
Expand Down Expand Up @@ -66,6 +67,12 @@ var Settings = React.createClass({
<span className="pure-form-message">The minimum area (in pixels) of a detected object before it gets counted as a person.</span>
</div>

<div class="pure-control-group">
<label htmlFor="MaxArea">Maximum Area: &nbsp;</label>
<input id="MaxArea" type="text" placeholder={ActiveLocation(store).MaxArea}></input>
<span className="pure-form-message">The maximum area (in pixels) of a detected object before it gets counted as a person.</span>
</div>

<div class="pure-control-group">
<label htmlFor="MinDuration">Minimum Duration: &nbsp;</label>
<input id="MinDuration" type="text" placeholder={ActiveLocation(store).MinDuration}></input>
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func main() {
}
if c == 0 {
ns := models.Scout{"", "0.0.0.0", 8080, false, "Location " + strconv.FormatInt(c+1, 10), "idle", &models.ScoutSummary{},
6160.0, 10, 128, 5, 500, 30.0, 0, 5.0, 2.0, 1.0, 200}
6160.0, 10, 128, 5, 500, 30.0, 0, 5.0, 2.0, 1.0, 200, 115000.0}
err = ns.Insert(db)
if err != nil {
log.Fatalf("ERROR: Unable to add initial scout to DB.")
Expand Down
1 change: 1 addition & 0 deletions migrations/0013_add_max_area_to_scouts.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE scouts DROP COLUMN max_area;
1 change: 1 addition & 0 deletions migrations/0013_add_max_area_to_scouts.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE scouts ADD COLUMN max_area double precision NOT NULL DEFAULT 2.0;
32 changes: 16 additions & 16 deletions models/ScoutInteraction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var _ = Describe("Scout Interaction Model", func() {

wp := []Waypoint{Waypoint{1, 2, 3, 4, 0.1}}
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())
i := Interaction{"abc", "0.1", t, t, 0.1, wp, 1, &s}
Expand All @@ -58,7 +58,7 @@ var _ = Describe("Scout Interaction Model", func() {
Context("Get", func() {
It("should be able to get scout interactions as json", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -83,7 +83,7 @@ var _ = Describe("Scout Interaction Model", func() {
Context("Insert", func() {
It("Should be able to insert a scout interaction", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -101,7 +101,7 @@ var _ = Describe("Scout Interaction Model", func() {
Context("Delete", func() {
It("Should be able to delete interactions for a specified scout", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -125,7 +125,7 @@ var _ = Describe("Scout Interaction Model", func() {
Context("Unprocessed", func() {
It("Should be able to get unproccessed interactions", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -151,7 +151,7 @@ var _ = Describe("Scout Interaction Model", func() {
Context("MarkProcessed", func() {
It("Should be able to mark interactions as processed", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -173,7 +173,7 @@ var _ = Describe("Scout Interaction Model", func() {
Context("Init scene", func() {
It("should be able to init an empty scene", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())
si := InitScene(&s)
Expand Down Expand Up @@ -236,7 +236,7 @@ var _ = Describe("Scout Interaction Model", func() {
tr := time.Now().UTC().Round(15 * time.Minute)

s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -253,7 +253,7 @@ var _ = Describe("Scout Interaction Model", func() {
b := Waypoint{1, 1, 1, 1, 0.005}

s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -275,7 +275,7 @@ var _ = Describe("Scout Interaction Model", func() {

It("should be able to add an interaction to an empty scene", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -288,7 +288,7 @@ var _ = Describe("Scout Interaction Model", func() {

It("should be able to add multiple interactions to an empty scene,", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -302,7 +302,7 @@ var _ = Describe("Scout Interaction Model", func() {

It("should list the interaction start time truncated to 30 mins", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -314,7 +314,7 @@ var _ = Describe("Scout Interaction Model", func() {

It("should be able to add an interaction to a scene with stuff already going on", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -331,7 +331,7 @@ var _ = Describe("Scout Interaction Model", func() {

It("should be able to add multiple interactions to a scene with stuff already going on", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -348,7 +348,7 @@ var _ = Describe("Scout Interaction Model", func() {

It("should be able to remove interactions when a person leaves the scene", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -362,7 +362,7 @@ var _ = Describe("Scout Interaction Model", func() {

It("should be able to remove multiple interactions when more than one person leaves the scene", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand Down
8 changes: 4 additions & 4 deletions models/ScoutSummary_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var _ = Describe("Scout Summary Model", func() {
Context("Insert", func() {
It("Scout insert should create matching scout summary", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -47,7 +47,7 @@ var _ = Describe("Scout Summary Model", func() {

It("Should be able to update existing scout summary.", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -69,7 +69,7 @@ var _ = Describe("Scout Summary Model", func() {
It("should be able to get scout healths as json", func() {
ss := ScoutSummary{}
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ss,
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
ss.ScoutUUID = s.UUID
Ω(err).Should(BeNil())
Expand All @@ -90,7 +90,7 @@ var _ = Describe("Scout Summary Model", func() {
Context("Clear", func() {
It("Should be able to clear an existing scout summary", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand Down
27 changes: 15 additions & 12 deletions models/scout.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,21 @@ type Scout struct {
MinDuration float32
IdleDuration float32
ResumeSqDistance int64
MaxArea float64
}

func GetScoutByUUID(db *sql.DB, uuid string) (*Scout, error) {
const query = `SELECT ip_address, port, authorised, name, state, min_area,
dilation_iterations, foreground_thresh, guassian_smooth,
mog_history_length, mog_threshold, mog_detect_shadows,
simplify_epsilon, min_duration, idle_duration, resume_sq_distance
simplify_epsilon, min_duration, idle_duration, resume_sq_distance, max_area
FROM scouts WHERE uuid = $1`
var result Scout
err := db.QueryRow(query, uuid).Scan(&result.IpAddress, &result.Port, &result.Authorised,
&result.Name, &result.State, &result.MinArea, &result.DilationIterations,
&result.ForegroundThresh, &result.GaussianSmooth, &result.MogHistoryLength,
&result.MogThreshold, &result.MogDetectShadows, &result.SimplifyEpsilon,
&result.MinDuration, &result.IdleDuration, &result.ResumeSqDistance)
&result.MinDuration, &result.IdleDuration, &result.ResumeSqDistance, &result.MaxArea)
result.UUID = uuid
result.Summary, err = GetScoutSummaryByUUID(db, result.UUID)
if err != nil {
Expand All @@ -98,14 +99,14 @@ func GetScout(db *sql.DB) *Scout {
const query = `SELECT uuid, ip_address, port, authorised, name, state, min_area,
dilation_iterations, foreground_thresh, guassian_smooth,
mog_history_length, mog_threshold, mog_detect_shadows,
simplify_epsilon, min_duration, idle_duration, resume_sq_distance
simplify_epsilon, min_duration, idle_duration, resume_sq_distance, max_area
FROM scouts LIMIT 1`
var result Scout
err := db.QueryRow(query).Scan(&result.UUID, &result.IpAddress, &result.Port, &result.Authorised,
&result.Name, &result.State, &result.MinArea, &result.DilationIterations,
&result.ForegroundThresh, &result.GaussianSmooth, &result.MogHistoryLength,
&result.MogThreshold, &result.MogDetectShadows, &result.SimplifyEpsilon,
&result.MinDuration, &result.IdleDuration, &result.ResumeSqDistance)
&result.MinDuration, &result.IdleDuration, &result.ResumeSqDistance, &result.MaxArea)
if err != nil {
log.Fatalf("Unable to get scout %v", err)
}
Expand All @@ -128,7 +129,8 @@ func GetAllScouts(db *sql.DB) ([]*Scout, error) {
const query = `SELECT uuid, ip_address, port, authorised, name, state, min_area,
dilation_iterations, foreground_thresh, guassian_smooth,
mog_history_length, mog_threshold, mog_detect_shadows,
simplify_epsilon, min_duration, idle_duration, resume_sq_distance FROM scouts`
simplify_epsilon, min_duration, idle_duration, resume_sq_distance,
max_area FROM scouts`

var result []*Scout
rows, err := db.Query(query)
Expand All @@ -145,7 +147,7 @@ func GetAllScouts(db *sql.DB) ([]*Scout, error) {
&s.MinArea, &s.DilationIterations, &s.ForegroundThresh,
&s.GaussianSmooth, &s.MogHistoryLength, &s.MogThreshold,
&s.MogDetectShadows, &s.SimplifyEpsilon, &s.MinDuration,
&s.IdleDuration, &s.ResumeSqDistance)
&s.IdleDuration, &s.ResumeSqDistance, &s.MaxArea)
if err != nil {
return result, err
}
Expand Down Expand Up @@ -192,13 +194,13 @@ func (s *Scout) Insert(db *sql.DB) error {
const query = `INSERT INTO scouts (ip_address, port, authorised, name, state, min_area,
dilation_iterations, foreground_thresh, guassian_smooth,
mog_history_length, mog_threshold, mog_detect_shadows,
simplify_epsilon, min_duration, idle_duration, resume_sq_distance)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16) RETURNING uuid`
simplify_epsilon, min_duration, idle_duration, resume_sq_distance, max_area)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17) RETURNING uuid`
err := db.QueryRow(query, s.IpAddress, s.Port, s.Authorised, s.Name, s.State,
s.MinArea, s.DilationIterations, s.ForegroundThresh,
s.GaussianSmooth, s.MogHistoryLength, s.MogThreshold,
s.MogDetectShadows, s.SimplifyEpsilon, s.MinDuration,
s.IdleDuration, s.ResumeSqDistance).Scan(&s.UUID)
s.IdleDuration, s.ResumeSqDistance, s.MaxArea).Scan(&s.UUID)
if err != nil {
return err
}
Expand All @@ -213,12 +215,13 @@ func (s *Scout) Update(db *sql.DB) error {
state = $5, min_area = $6, dilation_iterations = $7,
foreground_thresh = $8, guassian_smooth = $9, mog_history_length = $10,
mog_threshold = $11, mog_detect_shadows = $12, simplify_epsilon = $13,
min_duration = $14, idle_duration = $15, resume_sq_distance = $16 WHERE uuid = $17`
min_duration = $14, idle_duration = $15, resume_sq_distance = $16,
max_area = $17 WHERE uuid = $18`
_, err := db.Exec(query, s.IpAddress, s.Port, s.Authorised, s.Name, s.State,
s.MinArea, s.DilationIterations, s.ForegroundThresh,
s.GaussianSmooth, s.MogHistoryLength, s.MogThreshold,
s.MogDetectShadows, s.SimplifyEpsilon, s.MinDuration,
s.IdleDuration, s.ResumeSqDistance, s.UUID)
s.IdleDuration, s.ResumeSqDistance, s.MaxArea, s.UUID)
return err
}

Expand All @@ -243,7 +246,7 @@ func ScoutsAsJSON(db *sql.DB) ([]string, error) {
err = rows.Scan(&s.UUID, &s.IpAddress, &s.Authorised, &image, &s.Name, &s.State, &s.Port,
&s.MinArea, &s.DilationIterations, &s.ForegroundThresh, &s.GaussianSmooth,
&s.MogHistoryLength, &s.MogThreshold, &s.MogDetectShadows, &s.SimplifyEpsilon,
&s.MinDuration, &s.IdleDuration, &s.ResumeSqDistance)
&s.MinDuration, &s.IdleDuration, &s.ResumeSqDistance, &s.MaxArea)
if err != nil {
return files, err
}
Expand Down
6 changes: 3 additions & 3 deletions models/scoutHealth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var _ = Describe("Scout Health Model", func() {
Context("Insert", func() {
It("should insert a valid scouthealth into the DB.", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -63,7 +63,7 @@ var _ = Describe("Scout Health Model", func() {
Context("Delete", func() {
It("should be able to delete healths for a specified scout", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand All @@ -85,7 +85,7 @@ var _ = Describe("Scout Health Model", func() {
Context("Get", func() {
It("should be able to get scout healths as json", func() {
s := Scout{"", "192.168.0.1", 8080, true, "foo", "idle", &ScoutSummary{},
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1}
2.0, 2, 2, 2, 2, 2.0, 0, 2.0, 0.2, 0.3, 1, 4.0}
err := s.Insert(db)
Ω(err).Should(BeNil())

Expand Down
Loading

0 comments on commit eaec167

Please sign in to comment.