INNER CODE UNIT · Go
assertErrorNil
itaysk/kubectl-neat · cmd/cmd_test.go:26
func assertErrorNil(err error) bool {
return err == nil
}
func TestRootCmd(t *testing.T) {
resourceDataJSONPath := "../test/fixtures/service1-raw.json"
resourceDataJSONBytes, err := ioutil.ReadFile(resourceDataJSONPath)
resourceDataJSON := string(resourceDataJSONBytes)
if err != nil {
t.Errorf("error readin test data file %s: %v", resourceDataJSONPath, err)
}
resourceDataYAMLPath := "../test/fixtures/service1-raw.yaml"
resourceDataYAMLBytes, err := ioutil.ReadFile(resourceDataYAMLPath)
resourceDataYAML := string(resourceDataYAMLBytes)
if err != nil {
t.Errorf("error readin test data file %s: %v", resourceDataYAMLPath, err)
}
testcases := []struct {