Skip to content

Commit

Permalink
Remove TypeMeta initializations
Browse files Browse the repository at this point in the history
  • Loading branch information
camilamacedo86 authored Nov 6, 2019
1 parent e03cde6 commit 5a677b4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
6 changes: 0 additions & 6 deletions internal/scorecard/helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import (
"fmt"

scapiv1alpha1 "github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha1"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// These functions should be in the public test definitions file, but they are not complete/stable,
Expand Down Expand Up @@ -91,10 +89,6 @@ func CalculateResult(tests []scapiv1alpha1.ScorecardTestResult) scapiv1alpha1.Sc
// provided suites and log
func TestSuitesToScorecardOutput(suites []TestSuite, log string) scapiv1alpha1.ScorecardOutput {
test := scapiv1alpha1.ScorecardOutput{
TypeMeta: metav1.TypeMeta{
Kind: "ScorecardOutput",
APIVersion: "osdk.openshift.io/v1alpha1",
},
Log: log,
}
scorecardSuiteResults := []scapiv1alpha1.ScorecardSuiteResult{}
Expand Down
8 changes: 1 addition & 7 deletions pkg/apis/scorecard/v1v2conversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,11 @@ package scorecard
import (
scapiv1alpha1 "github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha1"
scapiv1alpha2 "github.com/operator-framework/operator-sdk/pkg/apis/scorecard/v1alpha2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func ConvertScorecardOutputV1ToV2(v1ScorecardOutput scapiv1alpha1.ScorecardOutput) scapiv1alpha2.ScorecardOutput {

output := scapiv1alpha2.ScorecardOutput{
TypeMeta: metav1.TypeMeta{
Kind: "ScorecardOutput",
APIVersion: "osdk.openshift.io/v1alpha2",
},
}
output := scapiv1alpha2.ScorecardOutput{}

// convert v1 suite into v2 test results
output.Results = make([]scapiv1alpha2.ScorecardTestResult, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,6 @@ func (r *ReconcileMemcached) deploymentForMemcached(m *cachev1alpha1.Memcached)
replicas := m.Spec.Size

dep := &appsv1.Deployment{
TypeMeta: metav1.TypeMeta{
APIVersion: "apps/v1",
Kind: "Deployment",
},
ObjectMeta: metav1.ObjectMeta{
Name: m.Name,
Namespace: m.Namespace,
Expand Down

0 comments on commit 5a677b4

Please sign in to comment.