forked from google/skia-buildbot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[powercycle] Switch from YAML to JSON5
Bug: skia:6933 Change-Id: Ief8680d64fdfe031eceeebea9c117144de1abac4 Reviewed-on: https://skia-review.googlesource.com/32380 Commit-Queue: Stephan Altmueller <[email protected]> Reviewed-by: Kevin Lubick <[email protected]>
- Loading branch information
Stephan Altmueller
authored and
Skia Commit-Bot
committed
Aug 10, 2017
1 parent
2c7feb4
commit cd7e86f
Showing
19 changed files
with
250 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"mpower": { | ||
"mpower.01": { | ||
"address": "192.168.2.212:22", | ||
"user": "ubnt", | ||
"ports": { | ||
"skia-e-linux-001": 1, | ||
"skia-e-linux-002": 2, | ||
"skia-e-linux-003": 3, | ||
"skia-e-linux-004": 4, | ||
"test-relay-1": 5 | ||
} | ||
}, | ||
"mpower.02": { | ||
"address": "192.168.2.212:23", | ||
"user": "ubnt", | ||
"ports": { | ||
"skia-e-linux-010": 1, | ||
"skia-e-linux-011": 2, | ||
"skia-e-linux-012": 3, | ||
"skia-e-linux-013": 4, | ||
"test-relay-2": 5 | ||
} | ||
} | ||
}, | ||
"edgeswitch": { | ||
"edgeswitch.01": { | ||
"address": "192.168.1.41:22", | ||
"ports": { | ||
"skia-rpi-TEST": 23, | ||
"skia-i-rpi-096": 2, | ||
"skia-i-rpi-097": 3, | ||
"skia-i-rpi-098": 4, | ||
"skia-i-rpi-099": 5 | ||
} | ||
}, | ||
"edgeswitch.02": { | ||
"address": "192.168.1.41:23", | ||
"ports": { | ||
"skia-rpi-2-TEST": 23, | ||
"skia-i-rpi-196": 2, | ||
"skia-i-rpi-197": 3, | ||
"skia-i-rpi-198": 4, | ||
"skia-i-rpi-199": 5 | ||
} | ||
}, | ||
"edgeswitch.03": { | ||
"address": "192.168.1.41:24", | ||
"ports": { | ||
"skia-rpi-1-TEST": 23, | ||
"skia-i-rpi-296": 2, | ||
"skia-i-rpi-297": 3, | ||
"skia-i-rpi-298": 4, | ||
"skia-i-rpi-299": 5 | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package powercycle | ||
|
||
import ( | ||
"testing" | ||
|
||
"go.skia.org/infra/go/testutils" | ||
|
||
assert "github.com/stretchr/testify/require" | ||
) | ||
|
||
var deviceIDs = []string{} | ||
|
||
func TestConfig(t *testing.T) { | ||
testutils.MediumTest(t) | ||
|
||
dev, err := DeviceGroupFromJson5File("./example.json5", false) | ||
assert.NoError(t, err) | ||
assert.Equal(t, 25, len(dev.DeviceIDs())) | ||
|
||
conf, err := readConfig("./example.json5") | ||
assert.NoError(t, err) | ||
|
||
for _, oneConf := range conf.Arduino { | ||
assert.NotEqual(t, "", oneConf.Address) | ||
assert.NotEqual(t, 0, len(oneConf.DevPortMap)) | ||
} | ||
|
||
for _, oneConf := range conf.EdgeSwitch { | ||
assert.NotEqual(t, "", oneConf.Address) | ||
assert.NotEqual(t, 0, len(oneConf.DevPortMap)) | ||
} | ||
|
||
for _, oneConf := range conf.MPower { | ||
assert.NotEqual(t, "", oneConf.Address) | ||
assert.NotEqual(t, 0, len(oneConf.DevPortMap)) | ||
assert.NotEqual(t, "", oneConf.User) | ||
} | ||
|
||
for _, oneConf := range conf.Seeeduino { | ||
assert.NotEqual(t, "", oneConf.Address) | ||
assert.NotEqual(t, "", oneConf.BaseURL) | ||
assert.NotEqual(t, 0, len(oneConf.DevPortMap)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.