Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
sk593 committed Sep 12, 2023
1 parent f84e218 commit 7fec90a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ var errorProcessorReference = processors.ResourceProcessor[*TestResource, TestRe
var errProcessor = errors.New("processor error")
var errConfiguration = errors.New("configuration error")

var oldOutputResourceResourceID = "/subscriptions/test-sub/resourceGroups/test-rg/providers/Applications.Test/testResources/test1"
var oldOutputResourceResourceID = "/subscriptions/test-sub/resourceGroups/test-rg/providers/Systems.Test/testResources/test1"

var newOutputResourceResourceID = "/subscriptions/test-sub/resourceGroups/test-rg/providers/Applications.Test/testResourcess/test2"
var newOutputResourceResourceID = "/subscriptions/test-sub/resourceGroups/test-rg/providers/Systems.Test/testResources/test2"
var newOutputResource = rpv1.OutputResource{ID: resources.MustParse(newOutputResourceResourceID)}

func TestCreateOrUpdateResource_Run(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/recipes/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (e *engine) getDriver(ctx context.Context, recipeMetadata recipes.ResourceM
// Determine Recipe driver type
driver, ok := e.options.Drivers[definition.Driver]
if !ok {
err := fmt.Errorf("could not find driver %s", definition.Driver)
err := fmt.Errorf("could not find driver `%s`", definition.Driver)
return nil, nil, recipes.NewRecipeError(recipes.RecipeDriverNotFoundFailure, err.Error(), util.RecipeSetupError, recipes.GetRecipeErrorDetails(err))
}
return definition, driver, nil
Expand Down
4 changes: 2 additions & 2 deletions pkg/recipes/engine/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func Test_Engine_InvalidDriver(t *testing.T) {
Return(recipeDefinition, nil)
_, err := engine.Execute(ctx, recipeMetadata, prevState)
require.Error(t, err)
require.Equal(t, "code DriverNotFoundFailure: err could not find driver invalid", err.Error())
require.Equal(t, "code DriverNotFoundFailure: err could not find driver `invalid`", err.Error())
}

func Test_Engine_Lookup_Error(t *testing.T) {
Expand Down Expand Up @@ -435,7 +435,7 @@ func Test_Delete_InvalidDriver(t *testing.T) {
Return(&recipeDefinition, nil)
err := engine.Delete(ctx, recipeMetadata, outputResources)
require.Error(t, err)
require.Equal(t, "code DriverNotFoundFailure: err could not find driver invalid", err.Error())
require.Equal(t, "code DriverNotFoundFailure: err could not find driver `invalid`", err.Error())
}

func Test_Delete_Lookup_Error(t *testing.T) {
Expand Down

0 comments on commit 7fec90a

Please sign in to comment.