• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

m-lab / locate / 1583

12 Jun 2025 03:42PM UTC coverage: 96.229% (-0.1%) from 96.362%
1583

push

travis-pro

web-flow
Factor filtering hosts into its own function for the registrations endpoint (#226)

* Considers only NDT registrations for siteinfo GeoJSON format

We don't want a separate GeoJSON feature for every experiment on every machine.
Instead, we only want a single feature for each machine. NDT runs on every
machine, so this should accurately represent the entire fleet. This is overly
NDT-centric, unfortunately, but is a reasonable start, I think.

* Factors filtering hosts into a separate function

Both the Hosts() and Geo() function use the filtering. I also renamed
Machines() to Hosts(), since this is more accurate as the returned values
experiment hostnames, not machine names.

* Sets appropriate headers for the registrations endpoint

Namely, we want a permissive CORS policy to allow any origin to make use of the
data provided by this endpoint.

* Refactors the filterHosts() function

The previous logic was not scalable and was difficult to read.

* Adds a machine property to the GeoJSON for registrations geo format

The machine format will be slightly different than the standart M-Lab machine
naming. Standard formatting is like <machine>-<site>, but this is going to be
<site>-<machine>, since that is the order that BYOS now uses.

38 of 39 new or added lines in 2 files covered. (97.44%)

3 existing lines in 1 file now uncovered.

2016 of 2095 relevant lines covered (96.23%)

1.07 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.06
/handler/handler.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc