Skip to content

Commit

Permalink
fix compile issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jananivMS committed Apr 21, 2020
1 parent 0f640e3 commit f56f92b
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 25 deletions.
1 change: 0 additions & 1 deletion controllers/azuresqlserver_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ func TestAzureSqlServerControllerNoResourceGroup(t *testing.T) {
t.Parallel()
defer PanicRecover(t)
ctx := context.Background()
assert := assert.New(t)

sqlServerName := GenerateTestResourceNameWithRandom("sqlserver-dev", 10)

Expand Down
6 changes: 1 addition & 5 deletions controllers/azuresqluser_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,21 @@ package controllers

import (
"context"
"strings"
"testing"

azurev1alpha1 "github.com/Azure/azure-service-operator/api/v1alpha1"
"github.com/Azure/azure-service-operator/pkg/errhelp"
"github.com/Azure/azure-service-operator/pkg/helpers"
"github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
)

func TestAzureSQLUserControllerNoAdminSecret(t *testing.T) {
t.Parallel()
defer PanicRecover(t)
ctx := context.Background()
assert := assert.New(t)
var err error

var sqlServerName string
var sqlDatabaseName string
var sqlUser *azurev1alpha1.AzureSQLUser
Expand Down
5 changes: 0 additions & 5 deletions controllers/azurevnetrule_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,18 @@ package controllers

import (
"context"
"strings"
"testing"

azurev1alpha1 "github.com/Azure/azure-service-operator/api/v1alpha1"
"github.com/stretchr/testify/assert"

"github.com/Azure/azure-service-operator/pkg/errhelp"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
)

func TestAzureSqlVNetRuleControllerNoResourceGroup(t *testing.T) {
t.Parallel()
defer PanicRecover(t)
ctx := context.Background()
assert := assert.New(t)

// Add any setup steps that needs to be executed before each test
sqlServerName := GenerateTestResourceNameWithRandom("sqlvnetrule-test-srv", 10)
Expand Down
7 changes: 3 additions & 4 deletions controllers/eventhub_storageaccount_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ package controllers

import (
"context"
"fmt"
"testing"

s "github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2019-04-01/storage"
azurev1alpha1 "github.com/Azure/azure-service-operator/api/v1alpha1"

//"github.com/Azure/azure-service-operator/pkg/errhelp"
"github.com/Azure/azure-service-operator/pkg/errhelp"

//kvhelper "github.com/Azure/azure-service-operator/pkg/resourcemanager/keyvaults"
//kvsecrets "github.com/Azure/azure-service-operator/pkg/secrets/keyvault"
kvhelper "github.com/Azure/azure-service-operator/pkg/resourcemanager/keyvaults"
kvsecrets "github.com/Azure/azure-service-operator/pkg/secrets/keyvault"

"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
4 changes: 0 additions & 4 deletions controllers/keyvault_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ package controllers
import (
"context"
"net/http"
"strings"
"testing"
"time"

Expand All @@ -19,7 +18,6 @@ import (
kvsecrets "github.com/Azure/azure-service-operator/pkg/secrets/keyvault"

"github.com/stretchr/testify/assert"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
)
Expand Down Expand Up @@ -236,7 +234,6 @@ func TestKeyvaultControllerInvalidName(t *testing.T) {
t.Parallel()
defer PanicRecover(t)
ctx := context.Background()
assert := assert.New(t)

keyVaultName := "k"

Expand All @@ -263,7 +260,6 @@ func TestKeyvaultControllerNoResourceGroup(t *testing.T) {
t.Parallel()
defer PanicRecover(t)
ctx := context.Background()
assert := assert.New(t)

keyVaultName := helpers.FillWithRandom(GenerateTestResourceName("kv"), 24)

Expand Down
6 changes: 0 additions & 6 deletions controllers/resourcegroup_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ import (
azurev1alpha1 "github.com/Azure/azure-service-operator/api/v1alpha1"
"github.com/stretchr/testify/assert"

apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
)

func TestResourceGroupControllerHappyPath(t *testing.T) {
Expand All @@ -26,8 +24,6 @@ func TestResourceGroupControllerHappyPath(t *testing.T) {

resourceGroupName := GenerateTestResourceNameWithRandom("rg-dev", 10)

var err error

// Create the ResourceGroup object and expect the Reconcile to be created
resourceGroupInstance := &azurev1alpha1.ResourceGroup{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -42,8 +38,6 @@ func TestResourceGroupControllerHappyPath(t *testing.T) {
// create rg
EnsureInstance(ctx, t, tc, resourceGroupInstance)

resourceGroupNamespacedName := types.NamespacedName{Name: resourceGroupName, Namespace: "default"}

// verify rg exists in azure
assert.Eventually(func() bool {
_, err := tc.resourceGroupManager.CheckExistence(ctx, resourceGroupName)
Expand Down

0 comments on commit f56f92b

Please sign in to comment.