]> git.giacomolli.uk - onehouse/blobdiff - driver/m31/connection_test.go
Apply M31 commands through the shared ledger
[onehouse] / driver / m31 / connection_test.go
index f2e67a6c22e10e333a4ae8b841ac27593adf460b..ede502b97f1baa0e6a35bc801fb1168c1bd43c36 100644 (file)
@@ -58,6 +58,12 @@ func TestConnectionRejectsConfigurationAndReadFailuresBeforeOnline(t *testing.T)
                {name: "rejects pulse register write failure", change: func(c *fakeClient) {
                        c.registerErr = errors.New("configuration failed")
                }},
+               {name: "rejects configuration read failure", change: func(c *fakeClient) {
+                       c.registerReadErr = errors.New("configuration read failed")
+               }},
+               {name: "rejects pulse width mismatch", change: func(c *fakeClient) {
+                       c.wrongRegister = pulseWidthBase + 2
+               }},
                {name: "rejects configuration mismatch", change: func(c *fakeClient) {
                        c.wrongConfig = true
                }},
@@ -77,7 +83,7 @@ func TestConnectionRejectsConfigurationAndReadFailuresBeforeOnline(t *testing.T)
 
        for _, tc := range testCases {
                t.Run(tc.name, func(t *testing.T) {
-                       d, client, transport := testAssembly(t)
+                       d, client, transport, _ := testAssembly(t)
                        tc.change(client)
 
                        c := &connection{owner: d}