INFRA-2175
| Saqib | Fix lint errors
This commit is contained in:
@@ -26,8 +26,6 @@ const documentDbTfPath = "document-db-tf"
|
||||
|
||||
var manifestFiles = [2]string{"sample_infra_manifest", "sample_infra_manifest_2"}
|
||||
|
||||
var testActions Actions
|
||||
|
||||
func textDiff(text1, text2 string) string {
|
||||
dmp := diffmatchpatch.New()
|
||||
diffs := dmp.DiffMain(text1, text2, false)
|
||||
@@ -72,7 +70,7 @@ func compareResourceWithOutput(resouceDir string, resource string, manifestFileN
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if bytes.Compare(expectedOutput, actualOutput) != 0 {
|
||||
if !bytes.Equal(expectedOutput, actualOutput) {
|
||||
return fmt.Errorf("Mismatch for %s, diff: %s\n", path, textDiff(string(actualOutput), string(expectedOutput)))
|
||||
}
|
||||
return nil
|
||||
@@ -103,7 +101,7 @@ func TestBinData_CompareWithTemplates(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if bytes.Compare(actualTemplate, binDataTemplate) != 0 {
|
||||
if !bytes.Equal(actualTemplate, binDataTemplate) {
|
||||
t.Errorf("Found outdated bindata for %s", path)
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user