Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jananivMS committed Apr 15, 2020
1 parent 4e1b794 commit 5f371ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions controllers/mysql_combined_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ package controllers

import (
"context"
"fmt"
"testing"

"github.com/Azure/azure-service-operator/pkg/resourcemanager/config"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

azurev1alpha1 "github.com/Azure/azure-service-operator/api/v1alpha1"
Expand All @@ -25,15 +23,15 @@ func TestMySQLHappyPath(t *testing.T) {
rgLocation := "eastus2"
rgName := tc.resourceGroupName
mySQLServerName := GenerateTestResourceNameWithRandom("mysql-srv", 10)
mySQLReplicaName := GenerateTestResourceNameWithRandom("mysql-rep", 10)

// Create the mySQLServer object and expect the Reconcile to be created
mySQLServerInstance := azurev1alpha1.NewDefaultMySQLServer(mySQLServerName, rgName, rgLocation)

RequireInstance(ctx, t, tc, mySQLServerInstance)

// Create a mySQL replica
fullSourceServerId := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.DBforMySQL/servers/%s", config.Subscription(), rgName, mySQLServerName)
mySQLReplicaInstance := azurev1alpha1.NewReplicaMySQLServer(mySQLServerName, rgName, rgLocation, fullSourceServerId)
mySQLReplicaInstance := azurev1alpha1.NewReplicaMySQLServer(mySQLReplicaName, rgName, rgLocation, mySQLServerInstance.Status.ResourceId)

EnsureInstance(ctx, t, tc, mySQLReplicaInstance)

Expand Down

0 comments on commit 5f371ca

Please sign in to comment.