From 4f4091a9bdc4fa30d1389e2cbd4ee677b6dabb3b Mon Sep 17 00:00:00 2001 From: James Shubin Date: Mon, 4 Mar 2019 10:17:50 -0500 Subject: [PATCH] engine: resources: Improve test case readability --- engine/resources/resources_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/engine/resources/resources_test.go b/engine/resources/resources_test.go index d0e6d534..c3c8d849 100644 --- a/engine/resources/resources_test.go +++ b/engine/resources/resources_test.go @@ -205,13 +205,13 @@ func TestResources1(t *testing.T) { testCases := []test{} { - res := makeRes("file", "r1") - r := res.(*FileRes) // if this panics, the test will panic + r := makeRes("file", "r1") + res := r.(*FileRes) // if this panics, the test will panic p := "/tmp/whatever" s := "hello, world\n" - r.Path = p + res.Path = p contents := s - r.Content = &contents + res.Content = &contents timeline := []Step{ NewStartupStep(1000 * 60), // startup @@ -479,6 +479,7 @@ func TestResources1(t *testing.T) { t.Errorf("test #%d: CheckApply failed: %s", index, err.Error()) return } + //t.Logf("test #%d: CheckApply(true) (%t, %+v)", index, checkOK, err) select { // send a msg if we can, but never block case changedChan <- checkOK: