engine: resources: Improve test case readability
This commit is contained in:
@@ -205,13 +205,13 @@ func TestResources1(t *testing.T) {
|
|||||||
|
|
||||||
testCases := []test{}
|
testCases := []test{}
|
||||||
{
|
{
|
||||||
res := makeRes("file", "r1")
|
r := makeRes("file", "r1")
|
||||||
r := res.(*FileRes) // if this panics, the test will panic
|
res := r.(*FileRes) // if this panics, the test will panic
|
||||||
p := "/tmp/whatever"
|
p := "/tmp/whatever"
|
||||||
s := "hello, world\n"
|
s := "hello, world\n"
|
||||||
r.Path = p
|
res.Path = p
|
||||||
contents := s
|
contents := s
|
||||||
r.Content = &contents
|
res.Content = &contents
|
||||||
|
|
||||||
timeline := []Step{
|
timeline := []Step{
|
||||||
NewStartupStep(1000 * 60), // startup
|
NewStartupStep(1000 * 60), // startup
|
||||||
@@ -479,6 +479,7 @@ func TestResources1(t *testing.T) {
|
|||||||
t.Errorf("test #%d: CheckApply failed: %s", index, err.Error())
|
t.Errorf("test #%d: CheckApply failed: %s", index, err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
//t.Logf("test #%d: CheckApply(true) (%t, %+v)", index, checkOK, err)
|
||||||
select {
|
select {
|
||||||
// send a msg if we can, but never block
|
// send a msg if we can, but never block
|
||||||
case changedChan <- checkOK:
|
case changedChan <- checkOK:
|
||||||
|
|||||||
Reference in New Issue
Block a user