remote: Re-assert the MD5's match
This commit is contained in:
parent
07e5f3ff41
commit
21c29dd229
|
@ -1,6 +1,8 @@
|
|||
package remote
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
|
@ -52,6 +54,8 @@ func TestAtlasRemote(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatalf("Err: %v", err)
|
||||
}
|
||||
inpMD5 := md5.Sum(inp)
|
||||
hash := inpMD5[:16]
|
||||
|
||||
// Delete the state, should be none
|
||||
err = r.DeleteState()
|
||||
|
@ -84,13 +88,13 @@ func TestAtlasRemote(t *testing.T) {
|
|||
}
|
||||
|
||||
// Check the payload
|
||||
//if !bytes.Equal(payload.MD5, hash) {
|
||||
// t.Fatalf("bad hash: %x %x", payload.MD5, hash)
|
||||
//}
|
||||
//if !bytes.Equal(payload.State, inp) {
|
||||
// t.Errorf("inp: %s", inp)
|
||||
// t.Fatalf("bad response: %s", payload.State)
|
||||
//}
|
||||
if !bytes.Equal(payload.MD5, hash) {
|
||||
t.Fatalf("bad hash: %x %x", payload.MD5, hash)
|
||||
}
|
||||
if !bytes.Equal(payload.State, inp) {
|
||||
t.Errorf("inp: %s", inp)
|
||||
t.Fatalf("bad response: %s", payload.State)
|
||||
}
|
||||
|
||||
// Delete the state
|
||||
err = r.DeleteState()
|
||||
|
|
Loading…
Reference in New Issue