fix test in endtoend_test.go
@@ -38,7 +38,7 @@ func TestCreateOrUpdateSQLServer(t *testing.T) {
// create the Go SDK client with relevant info
sdk := GoSDKClient{}
- location := "eastus2"
+ location := "eastus"
serverName := generateName("sqlsrvtest")
// create the server
@@ -48,9 +48,10 @@ func TestCreateOrUpdateSQLServer(t *testing.T) {
}
// wait for server to be created, then only proceed once activated
+ server, err := sdk.CreateOrUpdateSQLServer(ctx, groupName, location, serverName, sqlServerProperties)
for {
time.Sleep(time.Second)
- server, err := sdk.CreateOrUpdateSQLServer(ctx, groupName, location, serverName, sqlServerProperties)
+ server, err = sdk.GetServer(ctx, groupName, serverName)
if err == nil {
if *server.State == "Ready" {
util.PrintAndLog("sql server ready")
@@ -60,7 +61,7 @@ func TestCreateOrUpdateSQLServer(t *testing.T) {
continue
}
} else {
- if errhelp.IsAsynchronousOperationNotComplete(err) || errhelp.IsGroupNotFound(err) {
+ if errhelp.IsAsynchronousOperationNotComplete(err) || errhelp.IsGroupNotFound(err) || errhelp.IsResourceNotFound(err) {
util.PrintAndLog("waiting for sql server to be ready...")
continue
} else {
