Skip to content

Commit

Permalink
Updating registry in the redis functional test (#7781)
Browse files Browse the repository at this point in the history
# Description
Updating registry in the redis functional test.

## Type of change

Signed-off-by: ytimocin <[email protected]>
  • Loading branch information
ytimocin authored Aug 2, 2024
1 parent be5da14 commit 4c9db50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions test/functional-portable/cli/noncloud/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ func verifyRecipeCLI(ctx context.Context, t *testing.T, test rp.RPTest) {
resourceType := "Applications.Datastores/redisCaches"
file := "../../../testrecipes/test-bicep-recipes/corerp-redis-recipe.bicep"

target := fmt.Sprintf("br:%s/dev/test-bicep-recipes/redis-recipe:%s",
strings.TrimPrefix(registry, "registry="), generateUniqueTag())
target := fmt.Sprintf("br:%s/dev/test-bicep-recipes/redis-recipe:%s", registry, generateUniqueTag())

recipeName := "recipeName"
recipeTemplate := fmt.Sprintf("%s/recipes/local-dev/rediscaches:%s", registry, version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package resource_test

import (
"context"
"fmt"
"strings"
"testing"

Expand Down Expand Up @@ -105,9 +106,10 @@ func Test_Redis_Recipe(t *testing.T) {
status := redis.Properties["status"].(map[string]any)
recipe := status["recipe"].(map[string]interface{})
require.Equal(t, "bicep", recipe["templateKind"].(string))
templatePath := strings.Split(recipe["templatePath"].(string), ":")[0]
// TODO: Update this to the correct path
require.Equal(t, "radius-registry", templatePath)
// Updated templatePath is calculated by removing the tag from the templatePath
templatePath := recipe["templatePath"].(string)[:strings.LastIndex(recipe["templatePath"].(string), ":")]
registry := strings.TrimPrefix(testutil.GetBicepRecipeRegistry(), "registry=")
require.Equal(t, fmt.Sprintf("%s/test/testrecipes/test-bicep-recipes/redis-recipe-value-backed", registry), templatePath)
},
},
})
Expand Down

0 comments on commit 4c9db50

Please sign in to comment.